#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.5485
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace FiltronASP.Models
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[System.Data.Linq.Mapping.DatabaseAttribute(Name="08001726_141007")]
	public partial class CMSEntitiesDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertGallery(Gallery instance);
    partial void UpdateGallery(Gallery instance);
    partial void DeleteGallery(Gallery instance);
    partial void InsertGalleryImage(GalleryImage instance);
    partial void UpdateGalleryImage(GalleryImage instance);
    partial void DeleteGalleryImage(GalleryImage instance);
    partial void InsertMenuItemType(MenuItemType instance);
    partial void UpdateMenuItemType(MenuItemType instance);
    partial void DeleteMenuItemType(MenuItemType instance);
    partial void InsertMenuItem(MenuItem instance);
    partial void UpdateMenuItem(MenuItem instance);
    partial void DeleteMenuItem(MenuItem instance);
    partial void InsertMenu(Menu instance);
    partial void UpdateMenu(Menu instance);
    partial void DeleteMenu(Menu instance);
    partial void InsertModule(Module instance);
    partial void UpdateModule(Module instance);
    partial void DeleteModule(Module instance);
    partial void InsertModuleTemplate(ModuleTemplate instance);
    partial void UpdateModuleTemplate(ModuleTemplate instance);
    partial void DeleteModuleTemplate(ModuleTemplate instance);
    partial void InsertPageType(PageType instance);
    partial void UpdatePageType(PageType instance);
    partial void DeletePageType(PageType instance);
    partial void InsertPageTypeAcceptableTemplate(PageTypeAcceptableTemplate instance);
    partial void UpdatePageTypeAcceptableTemplate(PageTypeAcceptableTemplate instance);
    partial void DeletePageTypeAcceptableTemplate(PageTypeAcceptableTemplate instance);
    partial void InsertPage(Page instance);
    partial void UpdatePage(Page instance);
    partial void DeletePage(Page instance);
    partial void InsertTemplate(Template instance);
    partial void UpdateTemplate(Template instance);
    partial void DeleteTemplate(Template instance);
    partial void InsertVariableType(VariableType instance);
    partial void UpdateVariableType(VariableType instance);
    partial void DeleteVariableType(VariableType instance);
    partial void InsertVariableValue(VariableValue instance);
    partial void UpdateVariableValue(VariableValue instance);
    partial void DeleteVariableValue(VariableValue instance);
    partial void InsertVariable(Variable instance);
    partial void UpdateVariable(Variable instance);
    partial void DeleteVariable(Variable instance);
    partial void InsertFiltronEngineModel(FiltronEngineModel instance);
    partial void UpdateFiltronEngineModel(FiltronEngineModel instance);
    partial void DeleteFiltronEngineModel(FiltronEngineModel instance);
    partial void InsertFiltronEngine(FiltronEngine instance);
    partial void UpdateFiltronEngine(FiltronEngine instance);
    partial void DeleteFiltronEngine(FiltronEngine instance);
    partial void InsertFiltronFilterMedia(FiltronFilterMedia instance);
    partial void UpdateFiltronFilterMedia(FiltronFilterMedia instance);
    partial void DeleteFiltronFilterMedia(FiltronFilterMedia instance);
    partial void InsertFiltronFilterShape(FiltronFilterShape instance);
    partial void UpdateFiltronFilterShape(FiltronFilterShape instance);
    partial void DeleteFiltronFilterShape(FiltronFilterShape instance);
    partial void InsertFiltronFilterStyle(FiltronFilterStyle instance);
    partial void UpdateFiltronFilterStyle(FiltronFilterStyle instance);
    partial void DeleteFiltronFilterStyle(FiltronFilterStyle instance);
    partial void InsertFiltronFilterTypeShape(FiltronFilterTypeShape instance);
    partial void UpdateFiltronFilterTypeShape(FiltronFilterTypeShape instance);
    partial void DeleteFiltronFilterTypeShape(FiltronFilterTypeShape instance);
    partial void InsertFiltronFilterType(FiltronFilterType instance);
    partial void UpdateFiltronFilterType(FiltronFilterType instance);
    partial void DeleteFiltronFilterType(FiltronFilterType instance);
    partial void InsertFiltronInterchangeManufacturer(FiltronInterchangeManufacturer instance);
    partial void UpdateFiltronInterchangeManufacturer(FiltronInterchangeManufacturer instance);
    partial void DeleteFiltronInterchangeManufacturer(FiltronInterchangeManufacturer instance);
    partial void InsertFiltronMake(FiltronMake instance);
    partial void UpdateFiltronMake(FiltronMake instance);
    partial void DeleteFiltronMake(FiltronMake instance);
    partial void InsertFiltronModel(FiltronModel instance);
    partial void UpdateFiltronModel(FiltronModel instance);
    partial void DeleteFiltronModel(FiltronModel instance);
    partial void InsertFiltronVehicle(FiltronVehicle instance);
    partial void UpdateFiltronVehicle(FiltronVehicle instance);
    partial void DeleteFiltronVehicle(FiltronVehicle instance);
    partial void InsertWixEngineModel(WixEngineModel instance);
    partial void UpdateWixEngineModel(WixEngineModel instance);
    partial void DeleteWixEngineModel(WixEngineModel instance);
    partial void InsertWixEngine(WixEngine instance);
    partial void UpdateWixEngine(WixEngine instance);
    partial void DeleteWixEngine(WixEngine instance);
    partial void InsertWixFilterMedia(WixFilterMedia instance);
    partial void UpdateWixFilterMedia(WixFilterMedia instance);
    partial void DeleteWixFilterMedia(WixFilterMedia instance);
    partial void InsertWixFilterShape(WixFilterShape instance);
    partial void UpdateWixFilterShape(WixFilterShape instance);
    partial void DeleteWixFilterShape(WixFilterShape instance);
    partial void InsertWixFilterStyle(WixFilterStyle instance);
    partial void UpdateWixFilterStyle(WixFilterStyle instance);
    partial void DeleteWixFilterStyle(WixFilterStyle instance);
    partial void InsertWixFilterTypeShape(WixFilterTypeShape instance);
    partial void UpdateWixFilterTypeShape(WixFilterTypeShape instance);
    partial void DeleteWixFilterTypeShape(WixFilterTypeShape instance);
    partial void InsertWixFilterType(WixFilterType instance);
    partial void UpdateWixFilterType(WixFilterType instance);
    partial void DeleteWixFilterType(WixFilterType instance);
    partial void InsertWixInterchangeManufacturer(WixInterchangeManufacturer instance);
    partial void UpdateWixInterchangeManufacturer(WixInterchangeManufacturer instance);
    partial void DeleteWixInterchangeManufacturer(WixInterchangeManufacturer instance);
    partial void InsertWixInterchange(WixInterchange instance);
    partial void UpdateWixInterchange(WixInterchange instance);
    partial void DeleteWixInterchange(WixInterchange instance);
    partial void InsertWixMake(WixMake instance);
    partial void UpdateWixMake(WixMake instance);
    partial void DeleteWixMake(WixMake instance);
    partial void InsertWixModel(WixModel instance);
    partial void UpdateWixModel(WixModel instance);
    partial void DeleteWixModel(WixModel instance);
    partial void InsertWixVehicle(WixVehicle instance);
    partial void UpdateWixVehicle(WixVehicle instance);
    partial void DeleteWixVehicle(WixVehicle instance);
    partial void InsertWixFiltronCross(WixFiltronCross instance);
    partial void UpdateWixFiltronCross(WixFiltronCross instance);
    partial void DeleteWixFiltronCross(WixFiltronCross instance);
    partial void InsertWixFilterEngine(WixFilterEngine instance);
    partial void UpdateWixFilterEngine(WixFilterEngine instance);
    partial void DeleteWixFilterEngine(WixFilterEngine instance);
    partial void InsertFiltronFilterEngine(FiltronFilterEngine instance);
    partial void UpdateFiltronFilterEngine(FiltronFilterEngine instance);
    partial void DeleteFiltronFilterEngine(FiltronFilterEngine instance);
    partial void InsertWixFilter(WixFilter instance);
    partial void UpdateWixFilter(WixFilter instance);
    partial void DeleteWixFilter(WixFilter instance);
    partial void InsertFiltronFilter(FiltronFilter instance);
    partial void UpdateFiltronFilter(FiltronFilter instance);
    partial void DeleteFiltronFilter(FiltronFilter instance);
    partial void Insertfiltron_special_filter(filtron_special_filter instance);
    partial void Updatefiltron_special_filter(filtron_special_filter instance);
    partial void Deletefiltron_special_filter(filtron_special_filter instance);
    partial void Insertfiltron_special_filter_group(filtron_special_filter_group instance);
    partial void Updatefiltron_special_filter_group(filtron_special_filter_group instance);
    partial void Deletefiltron_special_filter_group(filtron_special_filter_group instance);
    partial void InsertFiltronFilterEngineComment(FiltronFilterEngineComment instance);
    partial void UpdateFiltronFilterEngineComment(FiltronFilterEngineComment instance);
    partial void DeleteFiltronFilterEngineComment(FiltronFilterEngineComment instance);
    partial void InsertWixFootnote(WixFootnote instance);
    partial void UpdateWixFootnote(WixFootnote instance);
    partial void DeleteWixFootnote(WixFootnote instance);
    partial void InsertWixFilterEngineFootnote(WixFilterEngineFootnote instance);
    partial void UpdateWixFilterEngineFootnote(WixFilterEngineFootnote instance);
    partial void DeleteWixFilterEngineFootnote(WixFilterEngineFootnote instance);
    partial void InsertWixFilterEngineComment(WixFilterEngineComment instance);
    partial void UpdateWixFilterEngineComment(WixFilterEngineComment instance);
    partial void DeleteWixFilterEngineComment(WixFilterEngineComment instance);
    partial void InsertLastSearch(LastSearch instance);
    partial void UpdateLastSearch(LastSearch instance);
    partial void DeleteLastSearch(LastSearch instance);
    partial void InsertUser(User instance);
    partial void UpdateUser(User instance);
    partial void DeleteUser(User instance);
    partial void InsertUserLanguage(UserLanguage instance);
    partial void UpdateUserLanguage(UserLanguage instance);
    partial void DeleteUserLanguage(UserLanguage instance);
    partial void InsertUserPageType(UserPageType instance);
    partial void UpdateUserPageType(UserPageType instance);
    partial void DeleteUserPageType(UserPageType instance);
    partial void InsertLanguage(Language instance);
    partial void UpdateLanguage(Language instance);
    partial void DeleteLanguage(Language instance);
    partial void InsertWixFilterService(WixFilterService instance);
    partial void UpdateWixFilterService(WixFilterService instance);
    partial void DeleteWixFilterService(WixFilterService instance);
    partial void InsertFiltronInterchange(FiltronInterchange instance);
    partial void UpdateFiltronInterchange(FiltronInterchange instance);
    partial void DeleteFiltronInterchange(FiltronInterchange instance);
    partial void InsertFiltronLogisticsInfo(FiltronLogisticsInfo instance);
    partial void UpdateFiltronLogisticsInfo(FiltronLogisticsInfo instance);
    partial void DeleteFiltronLogisticsInfo(FiltronLogisticsInfo instance);
    partial void InsertWixLogisticsInfo(WixLogisticsInfo instance);
    partial void UpdateWixLogisticsInfo(WixLogisticsInfo instance);
    partial void DeleteWixLogisticsInfo(WixLogisticsInfo instance);
    #endregion
		
		public CMSEntitiesDataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DataSourceConnectionString2"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public CMSEntitiesDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public CMSEntitiesDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public CMSEntitiesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public CMSEntitiesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<Gallery> Galleries
		{
			get
			{
				return this.GetTable<Gallery>();
			}
		}
		
		public System.Data.Linq.Table<GalleryImage> GalleryImages
		{
			get
			{
				return this.GetTable<GalleryImage>();
			}
		}
		
		public System.Data.Linq.Table<MenuItemType> MenuItemTypes
		{
			get
			{
				return this.GetTable<MenuItemType>();
			}
		}
		
		public System.Data.Linq.Table<MenuItem> MenuItems
		{
			get
			{
				return this.GetTable<MenuItem>();
			}
		}
		
		public System.Data.Linq.Table<Menu> Menus
		{
			get
			{
				return this.GetTable<Menu>();
			}
		}
		
		public System.Data.Linq.Table<Module> Modules
		{
			get
			{
				return this.GetTable<Module>();
			}
		}
		
		public System.Data.Linq.Table<ModuleTemplate> ModuleTemplates
		{
			get
			{
				return this.GetTable<ModuleTemplate>();
			}
		}
		
		public System.Data.Linq.Table<PageType> PageTypes
		{
			get
			{
				return this.GetTable<PageType>();
			}
		}
		
		public System.Data.Linq.Table<PageTypeAcceptableTemplate> PageTypeAcceptableTemplates
		{
			get
			{
				return this.GetTable<PageTypeAcceptableTemplate>();
			}
		}
		
		public System.Data.Linq.Table<Page> Pages
		{
			get
			{
				return this.GetTable<Page>();
			}
		}
		
		public System.Data.Linq.Table<Template> Templates
		{
			get
			{
				return this.GetTable<Template>();
			}
		}
		
		public System.Data.Linq.Table<VariableType> VariableTypes
		{
			get
			{
				return this.GetTable<VariableType>();
			}
		}
		
		public System.Data.Linq.Table<VariableValue> VariableValues
		{
			get
			{
				return this.GetTable<VariableValue>();
			}
		}
		
		public System.Data.Linq.Table<Variable> Variables
		{
			get
			{
				return this.GetTable<Variable>();
			}
		}
		
		public System.Data.Linq.Table<FiltronEngineModel> FiltronEngineModels
		{
			get
			{
				return this.GetTable<FiltronEngineModel>();
			}
		}
		
		public System.Data.Linq.Table<FiltronEngine> FiltronEngines
		{
			get
			{
				return this.GetTable<FiltronEngine>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterMedia> FiltronFilterMedias
		{
			get
			{
				return this.GetTable<FiltronFilterMedia>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterShape> FiltronFilterShapes
		{
			get
			{
				return this.GetTable<FiltronFilterShape>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterStyle> FiltronFilterStyles
		{
			get
			{
				return this.GetTable<FiltronFilterStyle>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterTypeShape> FiltronFilterTypeShapes
		{
			get
			{
				return this.GetTable<FiltronFilterTypeShape>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterType> FiltronFilterTypes
		{
			get
			{
				return this.GetTable<FiltronFilterType>();
			}
		}
		
		public System.Data.Linq.Table<FiltronInterchangeManufacturer> FiltronInterchangeManufacturers
		{
			get
			{
				return this.GetTable<FiltronInterchangeManufacturer>();
			}
		}
		
		public System.Data.Linq.Table<FiltronMake> FiltronMakes
		{
			get
			{
				return this.GetTable<FiltronMake>();
			}
		}
		
		public System.Data.Linq.Table<FiltronModel> FiltronModels
		{
			get
			{
				return this.GetTable<FiltronModel>();
			}
		}
		
		public System.Data.Linq.Table<FiltronVehicle> FiltronVehicles
		{
			get
			{
				return this.GetTable<FiltronVehicle>();
			}
		}
		
		public System.Data.Linq.Table<WixEngineModel> WixEngineModels
		{
			get
			{
				return this.GetTable<WixEngineModel>();
			}
		}
		
		public System.Data.Linq.Table<WixEngine> WixEngines
		{
			get
			{
				return this.GetTable<WixEngine>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterMedia> WixFilterMedias
		{
			get
			{
				return this.GetTable<WixFilterMedia>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterShape> WixFilterShapes
		{
			get
			{
				return this.GetTable<WixFilterShape>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterStyle> WixFilterStyles
		{
			get
			{
				return this.GetTable<WixFilterStyle>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterTypeShape> WixFilterTypeShapes
		{
			get
			{
				return this.GetTable<WixFilterTypeShape>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterType> WixFilterTypes
		{
			get
			{
				return this.GetTable<WixFilterType>();
			}
		}
		
		public System.Data.Linq.Table<WixInterchangeManufacturer> WixInterchangeManufacturers
		{
			get
			{
				return this.GetTable<WixInterchangeManufacturer>();
			}
		}
		
		public System.Data.Linq.Table<WixInterchange> WixInterchanges
		{
			get
			{
				return this.GetTable<WixInterchange>();
			}
		}
		
		public System.Data.Linq.Table<WixMake> WixMakes
		{
			get
			{
				return this.GetTable<WixMake>();
			}
		}
		
		public System.Data.Linq.Table<WixModel> WixModels
		{
			get
			{
				return this.GetTable<WixModel>();
			}
		}
		
		public System.Data.Linq.Table<WixVehicle> WixVehicles
		{
			get
			{
				return this.GetTable<WixVehicle>();
			}
		}
		
		public System.Data.Linq.Table<WixFiltronCross> WixFiltronCrosses
		{
			get
			{
				return this.GetTable<WixFiltronCross>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterEngine> WixFilterEngines
		{
			get
			{
				return this.GetTable<WixFilterEngine>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterEngine> FiltronFilterEngines
		{
			get
			{
				return this.GetTable<FiltronFilterEngine>();
			}
		}
		
		public System.Data.Linq.Table<WixFilter> WixFilters
		{
			get
			{
				return this.GetTable<WixFilter>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilter> FiltronFilters
		{
			get
			{
				return this.GetTable<FiltronFilter>();
			}
		}
		
		public System.Data.Linq.Table<filtron_special_filter> filtron_special_filters
		{
			get
			{
				return this.GetTable<filtron_special_filter>();
			}
		}
		
		public System.Data.Linq.Table<filtron_special_filter_group> filtron_special_filter_groups
		{
			get
			{
				return this.GetTable<filtron_special_filter_group>();
			}
		}
		
		public System.Data.Linq.Table<FiltronFilterEngineComment> FiltronFilterEngineComments
		{
			get
			{
				return this.GetTable<FiltronFilterEngineComment>();
			}
		}
		
		public System.Data.Linq.Table<WixFootnote> WixFootnotes
		{
			get
			{
				return this.GetTable<WixFootnote>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterEngineFootnote> WixFilterEngineFootnotes
		{
			get
			{
				return this.GetTable<WixFilterEngineFootnote>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterEngineComment> WixFilterEngineComments
		{
			get
			{
				return this.GetTable<WixFilterEngineComment>();
			}
		}
		
		public System.Data.Linq.Table<LastSearch> LastSearches
		{
			get
			{
				return this.GetTable<LastSearch>();
			}
		}
		
		public System.Data.Linq.Table<User> Users
		{
			get
			{
				return this.GetTable<User>();
			}
		}
		
		public System.Data.Linq.Table<UserLanguage> UserLanguages
		{
			get
			{
				return this.GetTable<UserLanguage>();
			}
		}
		
		public System.Data.Linq.Table<UserPageType> UserPageTypes
		{
			get
			{
				return this.GetTable<UserPageType>();
			}
		}
		
		public System.Data.Linq.Table<Language> Languages
		{
			get
			{
				return this.GetTable<Language>();
			}
		}
		
		public System.Data.Linq.Table<WixFilterService> WixFilterServices
		{
			get
			{
				return this.GetTable<WixFilterService>();
			}
		}
		
		public System.Data.Linq.Table<FiltronInterchange> FiltronInterchanges
		{
			get
			{
				return this.GetTable<FiltronInterchange>();
			}
		}
		
		public System.Data.Linq.Table<FiltronLogisticsInfo> FiltronLogisticsInfos
		{
			get
			{
				return this.GetTable<FiltronLogisticsInfo>();
			}
		}
		
		public System.Data.Linq.Table<WixLogisticsInfo> WixLogisticsInfos
		{
			get
			{
				return this.GetTable<WixLogisticsInfo>();
			}
		}
	}
	
	[Table(Name="dbo.galleries")]
	public partial class Gallery : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _gallery_id;
		
		private System.DateTime _gallery_created;
		
		private System.DateTime _gallery_modified;
		
		private string _gallery_name;
		
		private string _gallery_alias;
		
		private int _gallery_ordering;
		
		private bool _gallery_published;
		
		private System.Nullable<int> _gallery_created_by_id;
		
		private System.Nullable<int> _gallery_modified_by_id;
		
		private System.Nullable<int> _module_id;
		
		private System.Nullable<int> _language_id;
		
		private System.Nullable<int> _template_id;
		
		private EntitySet<GalleryImage> _GalleryImages;
		
		private EntityRef<Module> _Module;
		
		private EntityRef<Template> _Template;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ongallery_idChanging(int value);
    partial void Ongallery_idChanged();
    partial void Ongallery_createdChanging(System.DateTime value);
    partial void Ongallery_createdChanged();
    partial void Ongallery_modifiedChanging(System.DateTime value);
    partial void Ongallery_modifiedChanged();
    partial void Ongallery_nameChanging(string value);
    partial void Ongallery_nameChanged();
    partial void Ongallery_aliasChanging(string value);
    partial void Ongallery_aliasChanged();
    partial void Ongallery_orderingChanging(int value);
    partial void Ongallery_orderingChanged();
    partial void Ongallery_publishedChanging(bool value);
    partial void Ongallery_publishedChanged();
    partial void Ongallery_created_by_idChanging(System.Nullable<int> value);
    partial void Ongallery_created_by_idChanged();
    partial void Ongallery_modified_by_idChanging(System.Nullable<int> value);
    partial void Ongallery_modified_by_idChanged();
    partial void Onmodule_idChanging(System.Nullable<int> value);
    partial void Onmodule_idChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Ontemplate_idChanging(System.Nullable<int> value);
    partial void Ontemplate_idChanged();
    #endregion
		
		public Gallery()
		{
			this._GalleryImages = new EntitySet<GalleryImage>(new Action<GalleryImage>(this.attach_GalleryImages), new Action<GalleryImage>(this.detach_GalleryImages));
			this._Module = default(EntityRef<Module>);
			this._Template = default(EntityRef<Template>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_gallery_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int gallery_id
		{
			get
			{
				return this._gallery_id;
			}
			set
			{
				if ((this._gallery_id != value))
				{
					this.Ongallery_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_id = value;
					this.SendPropertyChanged("gallery_id");
					this.Ongallery_idChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_created", DbType="DateTime NOT NULL")]
		public System.DateTime gallery_created
		{
			get
			{
				return this._gallery_created;
			}
			set
			{
				if ((this._gallery_created != value))
				{
					this.Ongallery_createdChanging(value);
					this.SendPropertyChanging();
					this._gallery_created = value;
					this.SendPropertyChanged("gallery_created");
					this.Ongallery_createdChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_modified", DbType="DateTime NOT NULL")]
		public System.DateTime gallery_modified
		{
			get
			{
				return this._gallery_modified;
			}
			set
			{
				if ((this._gallery_modified != value))
				{
					this.Ongallery_modifiedChanging(value);
					this.SendPropertyChanging();
					this._gallery_modified = value;
					this.SendPropertyChanged("gallery_modified");
					this.Ongallery_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_name", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string gallery_name
		{
			get
			{
				return this._gallery_name;
			}
			set
			{
				if ((this._gallery_name != value))
				{
					this.Ongallery_nameChanging(value);
					this.SendPropertyChanging();
					this._gallery_name = value;
					this.SendPropertyChanged("gallery_name");
					this.Ongallery_nameChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_alias", DbType="NVarChar(255)")]
		public string gallery_alias
		{
			get
			{
				return this._gallery_alias;
			}
			set
			{
				if ((this._gallery_alias != value))
				{
					this.Ongallery_aliasChanging(value);
					this.SendPropertyChanging();
					this._gallery_alias = value;
					this.SendPropertyChanged("gallery_alias");
					this.Ongallery_aliasChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_ordering", DbType="Int NOT NULL")]
		public int gallery_ordering
		{
			get
			{
				return this._gallery_ordering;
			}
			set
			{
				if ((this._gallery_ordering != value))
				{
					this.Ongallery_orderingChanging(value);
					this.SendPropertyChanging();
					this._gallery_ordering = value;
					this.SendPropertyChanged("gallery_ordering");
					this.Ongallery_orderingChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_published", DbType="Bit NOT NULL")]
		public bool gallery_published
		{
			get
			{
				return this._gallery_published;
			}
			set
			{
				if ((this._gallery_published != value))
				{
					this.Ongallery_publishedChanging(value);
					this.SendPropertyChanging();
					this._gallery_published = value;
					this.SendPropertyChanged("gallery_published");
					this.Ongallery_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_created_by_id", DbType="Int")]
		public System.Nullable<int> gallery_created_by_id
		{
			get
			{
				return this._gallery_created_by_id;
			}
			set
			{
				if ((this._gallery_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongallery_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_created_by_id = value;
					this.SendPropertyChanged("gallery_created_by_id");
					this.Ongallery_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_modified_by_id", DbType="Int")]
		public System.Nullable<int> gallery_modified_by_id
		{
			get
			{
				return this._gallery_modified_by_id;
			}
			set
			{
				if ((this._gallery_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongallery_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_modified_by_id = value;
					this.SendPropertyChanged("gallery_modified_by_id");
					this.Ongallery_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_module_id", DbType="Int")]
		public System.Nullable<int> module_id
		{
			get
			{
				return this._module_id;
			}
			set
			{
				if ((this._module_id != value))
				{
					if (this._Module.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodule_idChanging(value);
					this.SendPropertyChanging();
					this._module_id = value;
					this.SendPropertyChanged("module_id");
					this.Onmodule_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_id", DbType="Int")]
		public System.Nullable<int> template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					if (this._Template.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Association(Name="Gallery_GalleryImage", Storage="_GalleryImages", ThisKey="gallery_id", OtherKey="gallery_id")]
		public EntitySet<GalleryImage> GalleryImages
		{
			get
			{
				return this._GalleryImages;
			}
			set
			{
				this._GalleryImages.Assign(value);
			}
		}
		
		[Association(Name="Module_Gallery", Storage="_Module", ThisKey="module_id", OtherKey="module_id", IsForeignKey=true)]
		public Module Module
		{
			get
			{
				return this._Module.Entity;
			}
			set
			{
				Module previousValue = this._Module.Entity;
				if (((previousValue != value) 
							|| (this._Module.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Module.Entity = null;
						previousValue.Galleries.Remove(this);
					}
					this._Module.Entity = value;
					if ((value != null))
					{
						value.Galleries.Add(this);
						this._module_id = value.module_id;
					}
					else
					{
						this._module_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Module");
				}
			}
		}
		
		[Association(Name="Template_Gallery", Storage="_Template", ThisKey="template_id", OtherKey="template_id", IsForeignKey=true)]
		public Template Template
		{
			get
			{
				return this._Template.Entity;
			}
			set
			{
				Template previousValue = this._Template.Entity;
				if (((previousValue != value) 
							|| (this._Template.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Template.Entity = null;
						previousValue.Galleries.Remove(this);
					}
					this._Template.Entity = value;
					if ((value != null))
					{
						value.Galleries.Add(this);
						this._template_id = value.template_id;
					}
					else
					{
						this._template_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Template");
				}
			}
		}
		
		[Association(Name="User_Gallery", Storage="_user", ThisKey="gallery_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.Galleries.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.Galleries.Add(this);
						this._gallery_created_by_id = value.user_id;
					}
					else
					{
						this._gallery_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_Gallery1", Storage="_User1", ThisKey="gallery_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.Galleries1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.Galleries1.Add(this);
						this._gallery_modified_by_id = value.user_id;
					}
					else
					{
						this._gallery_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		[Association(Name="Language_Gallery", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Galleries.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Galleries.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Gallery = this;
		}
		
		private void detach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Gallery = null;
		}
	}
	
	[Table(Name="dbo.gallery_images")]
	public partial class GalleryImage : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _gallery_image_id;
		
		private System.DateTime _gallery_image_created;
		
		private System.DateTime _gallery_image_modified;
		
		private string _gallery_image_link;
		
		private string _gallery_image_info;
		
		private int _gallery_image_ordering;
		
		private System.Nullable<bool> _gallery_image_published;
		
		private System.Nullable<int> _gallery_image_created_by_id;
		
		private System.Nullable<int> _gallery_image_modified_by_id;
		
		private System.Nullable<int> _gallery_id;
		
		private System.Nullable<int> _language_id;
		
		private System.Nullable<int> _page_id;
		
		private EntityRef<Gallery> _Gallery;
		
		private EntityRef<Page> _Page;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ongallery_image_idChanging(int value);
    partial void Ongallery_image_idChanged();
    partial void Ongallery_image_createdChanging(System.DateTime value);
    partial void Ongallery_image_createdChanged();
    partial void Ongallery_image_modifiedChanging(System.DateTime value);
    partial void Ongallery_image_modifiedChanged();
    partial void Ongallery_image_linkChanging(string value);
    partial void Ongallery_image_linkChanged();
    partial void Ongallery_image_infoChanging(string value);
    partial void Ongallery_image_infoChanged();
    partial void Ongallery_image_orderingChanging(int value);
    partial void Ongallery_image_orderingChanged();
    partial void Ongallery_image_publishedChanging(System.Nullable<bool> value);
    partial void Ongallery_image_publishedChanged();
    partial void Ongallery_image_created_by_idChanging(System.Nullable<int> value);
    partial void Ongallery_image_created_by_idChanged();
    partial void Ongallery_image_modified_by_idChanging(System.Nullable<int> value);
    partial void Ongallery_image_modified_by_idChanged();
    partial void Ongallery_idChanging(System.Nullable<int> value);
    partial void Ongallery_idChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Onpage_idChanging(System.Nullable<int> value);
    partial void Onpage_idChanged();
    #endregion
		
		public GalleryImage()
		{
			this._Gallery = default(EntityRef<Gallery>);
			this._Page = default(EntityRef<Page>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_gallery_image_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int gallery_image_id
		{
			get
			{
				return this._gallery_image_id;
			}
			set
			{
				if ((this._gallery_image_id != value))
				{
					this.Ongallery_image_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_id = value;
					this.SendPropertyChanged("gallery_image_id");
					this.Ongallery_image_idChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_created", DbType="DateTime NOT NULL")]
		public System.DateTime gallery_image_created
		{
			get
			{
				return this._gallery_image_created;
			}
			set
			{
				if ((this._gallery_image_created != value))
				{
					this.Ongallery_image_createdChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_created = value;
					this.SendPropertyChanged("gallery_image_created");
					this.Ongallery_image_createdChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_modified", DbType="DateTime NOT NULL")]
		public System.DateTime gallery_image_modified
		{
			get
			{
				return this._gallery_image_modified;
			}
			set
			{
				if ((this._gallery_image_modified != value))
				{
					this.Ongallery_image_modifiedChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_modified = value;
					this.SendPropertyChanged("gallery_image_modified");
					this.Ongallery_image_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_link", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string gallery_image_link
		{
			get
			{
				return this._gallery_image_link;
			}
			set
			{
				if ((this._gallery_image_link != value))
				{
					this.Ongallery_image_linkChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_link = value;
					this.SendPropertyChanged("gallery_image_link");
					this.Ongallery_image_linkChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_info", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string gallery_image_info
		{
			get
			{
				return this._gallery_image_info;
			}
			set
			{
				if ((this._gallery_image_info != value))
				{
					this.Ongallery_image_infoChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_info = value;
					this.SendPropertyChanged("gallery_image_info");
					this.Ongallery_image_infoChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_ordering", DbType="Int NOT NULL")]
		public int gallery_image_ordering
		{
			get
			{
				return this._gallery_image_ordering;
			}
			set
			{
				if ((this._gallery_image_ordering != value))
				{
					this.Ongallery_image_orderingChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_ordering = value;
					this.SendPropertyChanged("gallery_image_ordering");
					this.Ongallery_image_orderingChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_published", DbType="Bit")]
		public System.Nullable<bool> gallery_image_published
		{
			get
			{
				return this._gallery_image_published;
			}
			set
			{
				if ((this._gallery_image_published != value))
				{
					this.Ongallery_image_publishedChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_published = value;
					this.SendPropertyChanged("gallery_image_published");
					this.Ongallery_image_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_created_by_id", DbType="Int")]
		public System.Nullable<int> gallery_image_created_by_id
		{
			get
			{
				return this._gallery_image_created_by_id;
			}
			set
			{
				if ((this._gallery_image_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongallery_image_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_created_by_id = value;
					this.SendPropertyChanged("gallery_image_created_by_id");
					this.Ongallery_image_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_image_modified_by_id", DbType="Int")]
		public System.Nullable<int> gallery_image_modified_by_id
		{
			get
			{
				return this._gallery_image_modified_by_id;
			}
			set
			{
				if ((this._gallery_image_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongallery_image_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_image_modified_by_id = value;
					this.SendPropertyChanged("gallery_image_modified_by_id");
					this.Ongallery_image_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_gallery_id", DbType="Int")]
		public System.Nullable<int> gallery_id
		{
			get
			{
				return this._gallery_id;
			}
			set
			{
				if ((this._gallery_id != value))
				{
					if (this._Gallery.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongallery_idChanging(value);
					this.SendPropertyChanging();
					this._gallery_id = value;
					this.SendPropertyChanged("gallery_id");
					this.Ongallery_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_id", DbType="Int")]
		public System.Nullable<int> page_id
		{
			get
			{
				return this._page_id;
			}
			set
			{
				if ((this._page_id != value))
				{
					if (this._Page.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_idChanging(value);
					this.SendPropertyChanging();
					this._page_id = value;
					this.SendPropertyChanged("page_id");
					this.Onpage_idChanged();
				}
			}
		}
		
		[Association(Name="Gallery_GalleryImage", Storage="_Gallery", ThisKey="gallery_id", OtherKey="gallery_id", IsForeignKey=true)]
		public Gallery Gallery
		{
			get
			{
				return this._Gallery.Entity;
			}
			set
			{
				Gallery previousValue = this._Gallery.Entity;
				if (((previousValue != value) 
							|| (this._Gallery.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Gallery.Entity = null;
						previousValue.GalleryImages.Remove(this);
					}
					this._Gallery.Entity = value;
					if ((value != null))
					{
						value.GalleryImages.Add(this);
						this._gallery_id = value.gallery_id;
					}
					else
					{
						this._gallery_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Gallery");
				}
			}
		}
		
		[Association(Name="Page_GalleryImage", Storage="_Page", ThisKey="page_id", OtherKey="page_id", IsForeignKey=true)]
		public Page Page
		{
			get
			{
				return this._Page.Entity;
			}
			set
			{
				Page previousValue = this._Page.Entity;
				if (((previousValue != value) 
							|| (this._Page.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Page.Entity = null;
						previousValue.GalleryImages.Remove(this);
					}
					this._Page.Entity = value;
					if ((value != null))
					{
						value.GalleryImages.Add(this);
						this._page_id = value.page_id;
					}
					else
					{
						this._page_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Page");
				}
			}
		}
		
		[Association(Name="User_GalleryImage", Storage="_user", ThisKey="gallery_image_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.GalleryImages.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.GalleryImages.Add(this);
						this._gallery_image_created_by_id = value.user_id;
					}
					else
					{
						this._gallery_image_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_GalleryImage1", Storage="_User1", ThisKey="gallery_image_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.GalleryImages1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.GalleryImages1.Add(this);
						this._gallery_image_modified_by_id = value.user_id;
					}
					else
					{
						this._gallery_image_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		[Association(Name="Language_GalleryImage", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.GalleryImages.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.GalleryImages.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.menu_item_types")]
	public partial class MenuItemType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _type_id;
		
		private System.DateTime _type_created;
		
		private System.DateTime _type_modified;
		
		private string _type_abbr;
		
		private string _type_name;
		
		private string _type_img;
		
		private string _type_description;
		
		private bool _type_hidden;
		
		private EntitySet<MenuItem> _MenuItems;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontype_idChanging(int value);
    partial void Ontype_idChanged();
    partial void Ontype_createdChanging(System.DateTime value);
    partial void Ontype_createdChanged();
    partial void Ontype_modifiedChanging(System.DateTime value);
    partial void Ontype_modifiedChanged();
    partial void Ontype_abbrChanging(string value);
    partial void Ontype_abbrChanged();
    partial void Ontype_nameChanging(string value);
    partial void Ontype_nameChanged();
    partial void Ontype_imgChanging(string value);
    partial void Ontype_imgChanged();
    partial void Ontype_descriptionChanging(string value);
    partial void Ontype_descriptionChanged();
    partial void Ontype_hiddenChanging(bool value);
    partial void Ontype_hiddenChanged();
    #endregion
		
		public MenuItemType()
		{
			this._MenuItems = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems), new Action<MenuItem>(this.detach_MenuItems));
			OnCreated();
		}
		
		[Column(Storage="_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int type_id
		{
			get
			{
				return this._type_id;
			}
			set
			{
				if ((this._type_id != value))
				{
					this.Ontype_idChanging(value);
					this.SendPropertyChanging();
					this._type_id = value;
					this.SendPropertyChanged("type_id");
					this.Ontype_idChanged();
				}
			}
		}
		
		[Column(Storage="_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime type_created
		{
			get
			{
				return this._type_created;
			}
			set
			{
				if ((this._type_created != value))
				{
					this.Ontype_createdChanging(value);
					this.SendPropertyChanging();
					this._type_created = value;
					this.SendPropertyChanged("type_created");
					this.Ontype_createdChanged();
				}
			}
		}
		
		[Column(Storage="_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime type_modified
		{
			get
			{
				return this._type_modified;
			}
			set
			{
				if ((this._type_modified != value))
				{
					this.Ontype_modifiedChanging(value);
					this.SendPropertyChanging();
					this._type_modified = value;
					this.SendPropertyChanged("type_modified");
					this.Ontype_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_type_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string type_abbr
		{
			get
			{
				return this._type_abbr;
			}
			set
			{
				if ((this._type_abbr != value))
				{
					this.Ontype_abbrChanging(value);
					this.SendPropertyChanging();
					this._type_abbr = value;
					this.SendPropertyChanged("type_abbr");
					this.Ontype_abbrChanged();
				}
			}
		}
		
		[Column(Storage="_type_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string type_name
		{
			get
			{
				return this._type_name;
			}
			set
			{
				if ((this._type_name != value))
				{
					this.Ontype_nameChanging(value);
					this.SendPropertyChanging();
					this._type_name = value;
					this.SendPropertyChanged("type_name");
					this.Ontype_nameChanged();
				}
			}
		}
		
		[Column(Storage="_type_img", DbType="NVarChar(100)")]
		public string type_img
		{
			get
			{
				return this._type_img;
			}
			set
			{
				if ((this._type_img != value))
				{
					this.Ontype_imgChanging(value);
					this.SendPropertyChanging();
					this._type_img = value;
					this.SendPropertyChanged("type_img");
					this.Ontype_imgChanged();
				}
			}
		}
		
		[Column(Storage="_type_description", DbType="NVarChar(255)")]
		public string type_description
		{
			get
			{
				return this._type_description;
			}
			set
			{
				if ((this._type_description != value))
				{
					this.Ontype_descriptionChanging(value);
					this.SendPropertyChanging();
					this._type_description = value;
					this.SendPropertyChanged("type_description");
					this.Ontype_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_type_hidden", DbType="Bit NOT NULL")]
		public bool type_hidden
		{
			get
			{
				return this._type_hidden;
			}
			set
			{
				if ((this._type_hidden != value))
				{
					this.Ontype_hiddenChanging(value);
					this.SendPropertyChanging();
					this._type_hidden = value;
					this.SendPropertyChanged("type_hidden");
					this.Ontype_hiddenChanged();
				}
			}
		}
		
		[Association(Name="MenuItemType_MenuItem", Storage="_MenuItems", ThisKey="type_id", OtherKey="item_type_id")]
		public EntitySet<MenuItem> MenuItems
		{
			get
			{
				return this._MenuItems;
			}
			set
			{
				this._MenuItems.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.MenuItemType = this;
		}
		
		private void detach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.MenuItemType = null;
		}
	}
	
	[Table(Name="dbo.menu_items")]
	public partial class MenuItem : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _item_id;
		
		private System.DateTime _item_created;
		
		private System.DateTime _item_modified;
		
		private string _item_name;
		
		private string _item_alias;
		
		private string _item_img;
		
		private int _item_ordering;
		
		private bool _item_published;
		
		private string _item_link;
		
		private int _item_type_id;
		
		private System.Nullable<int> _parent_item_id;
		
		private System.Nullable<int> _menu_id;
		
		private bool _item_editable;
		
		private bool _item_removable;
		
		private System.Nullable<int> _item_created_by_id;
		
		private System.Nullable<int> _item_modified_by_id;
		
		private string _item_path;
		
		private int _item_depth;
		
		private System.Nullable<int> _page_id;
		
		private EntitySet<MenuItem> _MenuItems;
		
		private EntityRef<MenuItemType> _MenuItemType;
		
		private EntityRef<MenuItem> _menu_item1;
		
		private EntityRef<Menu> _Menu;
		
		private EntityRef<Page> _Page;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onitem_idChanging(int value);
    partial void Onitem_idChanged();
    partial void Onitem_createdChanging(System.DateTime value);
    partial void Onitem_createdChanged();
    partial void Onitem_modifiedChanging(System.DateTime value);
    partial void Onitem_modifiedChanged();
    partial void Onitem_nameChanging(string value);
    partial void Onitem_nameChanged();
    partial void Onitem_aliasChanging(string value);
    partial void Onitem_aliasChanged();
    partial void Onitem_imgChanging(string value);
    partial void Onitem_imgChanged();
    partial void Onitem_orderingChanging(int value);
    partial void Onitem_orderingChanged();
    partial void Onitem_publishedChanging(bool value);
    partial void Onitem_publishedChanged();
    partial void Onitem_linkChanging(string value);
    partial void Onitem_linkChanged();
    partial void Onitem_type_idChanging(int value);
    partial void Onitem_type_idChanged();
    partial void Onparent_item_idChanging(System.Nullable<int> value);
    partial void Onparent_item_idChanged();
    partial void Onmenu_idChanging(System.Nullable<int> value);
    partial void Onmenu_idChanged();
    partial void Onitem_editableChanging(bool value);
    partial void Onitem_editableChanged();
    partial void Onitem_removableChanging(bool value);
    partial void Onitem_removableChanged();
    partial void Onitem_created_by_idChanging(System.Nullable<int> value);
    partial void Onitem_created_by_idChanged();
    partial void Onitem_modified_by_idChanging(System.Nullable<int> value);
    partial void Onitem_modified_by_idChanged();
    partial void Onitem_pathChanging(string value);
    partial void Onitem_pathChanged();
    partial void Onitem_depthChanging(int value);
    partial void Onitem_depthChanged();
    partial void Onpage_idChanging(System.Nullable<int> value);
    partial void Onpage_idChanged();
    #endregion
		
		public MenuItem()
		{
			this._MenuItems = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems), new Action<MenuItem>(this.detach_MenuItems));
			this._MenuItemType = default(EntityRef<MenuItemType>);
			this._menu_item1 = default(EntityRef<MenuItem>);
			this._Menu = default(EntityRef<Menu>);
			this._Page = default(EntityRef<Page>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			OnCreated();
		}
		
		[Column(Storage="_item_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int item_id
		{
			get
			{
				return this._item_id;
			}
			set
			{
				if ((this._item_id != value))
				{
					this.Onitem_idChanging(value);
					this.SendPropertyChanging();
					this._item_id = value;
					this.SendPropertyChanged("item_id");
					this.Onitem_idChanged();
				}
			}
		}
		
		[Column(Storage="_item_created", DbType="DateTime NOT NULL")]
		public System.DateTime item_created
		{
			get
			{
				return this._item_created;
			}
			set
			{
				if ((this._item_created != value))
				{
					this.Onitem_createdChanging(value);
					this.SendPropertyChanging();
					this._item_created = value;
					this.SendPropertyChanged("item_created");
					this.Onitem_createdChanged();
				}
			}
		}
		
		[Column(Storage="_item_modified", DbType="DateTime NOT NULL")]
		public System.DateTime item_modified
		{
			get
			{
				return this._item_modified;
			}
			set
			{
				if ((this._item_modified != value))
				{
					this.Onitem_modifiedChanging(value);
					this.SendPropertyChanging();
					this._item_modified = value;
					this.SendPropertyChanged("item_modified");
					this.Onitem_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_item_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string item_name
		{
			get
			{
				return this._item_name;
			}
			set
			{
				if ((this._item_name != value))
				{
					this.Onitem_nameChanging(value);
					this.SendPropertyChanging();
					this._item_name = value;
					this.SendPropertyChanged("item_name");
					this.Onitem_nameChanged();
				}
			}
		}
		
		[Column(Storage="_item_alias", DbType="NVarChar(255)")]
		public string item_alias
		{
			get
			{
				return this._item_alias;
			}
			set
			{
				if ((this._item_alias != value))
				{
					this.Onitem_aliasChanging(value);
					this.SendPropertyChanging();
					this._item_alias = value;
					this.SendPropertyChanged("item_alias");
					this.Onitem_aliasChanged();
				}
			}
		}
		
		[Column(Storage="_item_img", DbType="NVarChar(100)")]
		public string item_img
		{
			get
			{
				return this._item_img;
			}
			set
			{
				if ((this._item_img != value))
				{
					this.Onitem_imgChanging(value);
					this.SendPropertyChanging();
					this._item_img = value;
					this.SendPropertyChanged("item_img");
					this.Onitem_imgChanged();
				}
			}
		}
		
		[Column(Storage="_item_ordering", DbType="Int NOT NULL")]
		public int item_ordering
		{
			get
			{
				return this._item_ordering;
			}
			set
			{
				if ((this._item_ordering != value))
				{
					this.Onitem_orderingChanging(value);
					this.SendPropertyChanging();
					this._item_ordering = value;
					this.SendPropertyChanged("item_ordering");
					this.Onitem_orderingChanged();
				}
			}
		}
		
		[Column(Storage="_item_published", DbType="Bit NOT NULL")]
		public bool item_published
		{
			get
			{
				return this._item_published;
			}
			set
			{
				if ((this._item_published != value))
				{
					this.Onitem_publishedChanging(value);
					this.SendPropertyChanging();
					this._item_published = value;
					this.SendPropertyChanged("item_published");
					this.Onitem_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_item_link", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string item_link
		{
			get
			{
				return this._item_link;
			}
			set
			{
				if ((this._item_link != value))
				{
					this.Onitem_linkChanging(value);
					this.SendPropertyChanging();
					this._item_link = value;
					this.SendPropertyChanged("item_link");
					this.Onitem_linkChanged();
				}
			}
		}
		
		[Column(Storage="_item_type_id", DbType="Int NOT NULL")]
		public int item_type_id
		{
			get
			{
				return this._item_type_id;
			}
			set
			{
				if ((this._item_type_id != value))
				{
					if (this._MenuItemType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onitem_type_idChanging(value);
					this.SendPropertyChanging();
					this._item_type_id = value;
					this.SendPropertyChanged("item_type_id");
					this.Onitem_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_parent_item_id", DbType="Int")]
		public System.Nullable<int> parent_item_id
		{
			get
			{
				return this._parent_item_id;
			}
			set
			{
				if ((this._parent_item_id != value))
				{
					if (this._menu_item1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onparent_item_idChanging(value);
					this.SendPropertyChanging();
					this._parent_item_id = value;
					this.SendPropertyChanged("parent_item_id");
					this.Onparent_item_idChanged();
				}
			}
		}
		
		[Column(Storage="_menu_id", DbType="Int")]
		public System.Nullable<int> menu_id
		{
			get
			{
				return this._menu_id;
			}
			set
			{
				if ((this._menu_id != value))
				{
					if (this._Menu.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmenu_idChanging(value);
					this.SendPropertyChanging();
					this._menu_id = value;
					this.SendPropertyChanged("menu_id");
					this.Onmenu_idChanged();
				}
			}
		}
		
		[Column(Storage="_item_editable", DbType="Bit NOT NULL")]
		public bool item_editable
		{
			get
			{
				return this._item_editable;
			}
			set
			{
				if ((this._item_editable != value))
				{
					this.Onitem_editableChanging(value);
					this.SendPropertyChanging();
					this._item_editable = value;
					this.SendPropertyChanged("item_editable");
					this.Onitem_editableChanged();
				}
			}
		}
		
		[Column(Storage="_item_removable", DbType="Bit NOT NULL")]
		public bool item_removable
		{
			get
			{
				return this._item_removable;
			}
			set
			{
				if ((this._item_removable != value))
				{
					this.Onitem_removableChanging(value);
					this.SendPropertyChanging();
					this._item_removable = value;
					this.SendPropertyChanged("item_removable");
					this.Onitem_removableChanged();
				}
			}
		}
		
		[Column(Storage="_item_created_by_id", DbType="Int")]
		public System.Nullable<int> item_created_by_id
		{
			get
			{
				return this._item_created_by_id;
			}
			set
			{
				if ((this._item_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onitem_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._item_created_by_id = value;
					this.SendPropertyChanged("item_created_by_id");
					this.Onitem_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_item_modified_by_id", DbType="Int")]
		public System.Nullable<int> item_modified_by_id
		{
			get
			{
				return this._item_modified_by_id;
			}
			set
			{
				if ((this._item_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onitem_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._item_modified_by_id = value;
					this.SendPropertyChanged("item_modified_by_id");
					this.Onitem_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_item_path", DbType="NVarChar(MAX)")]
		public string item_path
		{
			get
			{
				return this._item_path;
			}
			set
			{
				if ((this._item_path != value))
				{
					this.Onitem_pathChanging(value);
					this.SendPropertyChanging();
					this._item_path = value;
					this.SendPropertyChanged("item_path");
					this.Onitem_pathChanged();
				}
			}
		}
		
		[Column(Storage="_item_depth", DbType="Int NOT NULL")]
		public int item_depth
		{
			get
			{
				return this._item_depth;
			}
			set
			{
				if ((this._item_depth != value))
				{
					this.Onitem_depthChanging(value);
					this.SendPropertyChanging();
					this._item_depth = value;
					this.SendPropertyChanged("item_depth");
					this.Onitem_depthChanged();
				}
			}
		}
		
		[Column(Storage="_page_id", DbType="Int")]
		public System.Nullable<int> page_id
		{
			get
			{
				return this._page_id;
			}
			set
			{
				if ((this._page_id != value))
				{
					if (this._Page.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_idChanging(value);
					this.SendPropertyChanging();
					this._page_id = value;
					this.SendPropertyChanged("page_id");
					this.Onpage_idChanged();
				}
			}
		}
		
		[Association(Name="MenuItem_MenuItem", Storage="_MenuItems", ThisKey="item_id", OtherKey="parent_item_id")]
		public EntitySet<MenuItem> MenuItems
		{
			get
			{
				return this._MenuItems;
			}
			set
			{
				this._MenuItems.Assign(value);
			}
		}
		
		[Association(Name="MenuItemType_MenuItem", Storage="_MenuItemType", ThisKey="item_type_id", OtherKey="type_id", IsForeignKey=true)]
		public MenuItemType MenuItemType
		{
			get
			{
				return this._MenuItemType.Entity;
			}
			set
			{
				MenuItemType previousValue = this._MenuItemType.Entity;
				if (((previousValue != value) 
							|| (this._MenuItemType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._MenuItemType.Entity = null;
						previousValue.MenuItems.Remove(this);
					}
					this._MenuItemType.Entity = value;
					if ((value != null))
					{
						value.MenuItems.Add(this);
						this._item_type_id = value.type_id;
					}
					else
					{
						this._item_type_id = default(int);
					}
					this.SendPropertyChanged("MenuItemType");
				}
			}
		}
		
		[Association(Name="MenuItem_MenuItem", Storage="_menu_item1", ThisKey="parent_item_id", OtherKey="item_id", IsForeignKey=true)]
		public MenuItem menu_item1
		{
			get
			{
				return this._menu_item1.Entity;
			}
			set
			{
				MenuItem previousValue = this._menu_item1.Entity;
				if (((previousValue != value) 
							|| (this._menu_item1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._menu_item1.Entity = null;
						previousValue.MenuItems.Remove(this);
					}
					this._menu_item1.Entity = value;
					if ((value != null))
					{
						value.MenuItems.Add(this);
						this._parent_item_id = value.item_id;
					}
					else
					{
						this._parent_item_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("menu_item1");
				}
			}
		}
		
		[Association(Name="Menu_MenuItem", Storage="_Menu", ThisKey="menu_id", OtherKey="menu_id", IsForeignKey=true)]
		public Menu Menu
		{
			get
			{
				return this._Menu.Entity;
			}
			set
			{
				Menu previousValue = this._Menu.Entity;
				if (((previousValue != value) 
							|| (this._Menu.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Menu.Entity = null;
						previousValue.MenuItems.Remove(this);
					}
					this._Menu.Entity = value;
					if ((value != null))
					{
						value.MenuItems.Add(this);
						this._menu_id = value.menu_id;
					}
					else
					{
						this._menu_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Menu");
				}
			}
		}
		
		[Association(Name="Page_MenuItem", Storage="_Page", ThisKey="page_id", OtherKey="page_id", IsForeignKey=true)]
		public Page Page
		{
			get
			{
				return this._Page.Entity;
			}
			set
			{
				Page previousValue = this._Page.Entity;
				if (((previousValue != value) 
							|| (this._Page.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Page.Entity = null;
						previousValue.MenuItems.Remove(this);
					}
					this._Page.Entity = value;
					if ((value != null))
					{
						value.MenuItems.Add(this);
						this._page_id = value.page_id;
					}
					else
					{
						this._page_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Page");
				}
			}
		}
		
		[Association(Name="User_MenuItem", Storage="_user", ThisKey="item_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.MenuItems.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.MenuItems.Add(this);
						this._item_created_by_id = value.user_id;
					}
					else
					{
						this._item_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_MenuItem1", Storage="_User1", ThisKey="item_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.MenuItems1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.MenuItems1.Add(this);
						this._item_modified_by_id = value.user_id;
					}
					else
					{
						this._item_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.menu_item1 = this;
		}
		
		private void detach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.menu_item1 = null;
		}
	}
	
	[Table(Name="dbo.menus")]
	public partial class Menu : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _menu_id;
		
		private System.DateTime _menu_created;
		
		private System.DateTime _menu_modified;
		
		private string _menu_name;
		
		private string _menu_description;
		
		private bool _menu_hidden;
		
		private System.Nullable<int> _language_id;
		
		private System.Nullable<int> _module_id;
		
		private EntitySet<MenuItem> _MenuItems;
		
		private EntityRef<Module> _Module;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmenu_idChanging(int value);
    partial void Onmenu_idChanged();
    partial void Onmenu_createdChanging(System.DateTime value);
    partial void Onmenu_createdChanged();
    partial void Onmenu_modifiedChanging(System.DateTime value);
    partial void Onmenu_modifiedChanged();
    partial void Onmenu_nameChanging(string value);
    partial void Onmenu_nameChanged();
    partial void Onmenu_descriptionChanging(string value);
    partial void Onmenu_descriptionChanged();
    partial void Onmenu_hiddenChanging(bool value);
    partial void Onmenu_hiddenChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Onmodule_idChanging(System.Nullable<int> value);
    partial void Onmodule_idChanged();
    #endregion
		
		public Menu()
		{
			this._MenuItems = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems), new Action<MenuItem>(this.detach_MenuItems));
			this._Module = default(EntityRef<Module>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_menu_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int menu_id
		{
			get
			{
				return this._menu_id;
			}
			set
			{
				if ((this._menu_id != value))
				{
					this.Onmenu_idChanging(value);
					this.SendPropertyChanging();
					this._menu_id = value;
					this.SendPropertyChanged("menu_id");
					this.Onmenu_idChanged();
				}
			}
		}
		
		[Column(Storage="_menu_created", DbType="DateTime NOT NULL")]
		public System.DateTime menu_created
		{
			get
			{
				return this._menu_created;
			}
			set
			{
				if ((this._menu_created != value))
				{
					this.Onmenu_createdChanging(value);
					this.SendPropertyChanging();
					this._menu_created = value;
					this.SendPropertyChanged("menu_created");
					this.Onmenu_createdChanged();
				}
			}
		}
		
		[Column(Storage="_menu_modified", DbType="DateTime NOT NULL")]
		public System.DateTime menu_modified
		{
			get
			{
				return this._menu_modified;
			}
			set
			{
				if ((this._menu_modified != value))
				{
					this.Onmenu_modifiedChanging(value);
					this.SendPropertyChanging();
					this._menu_modified = value;
					this.SendPropertyChanged("menu_modified");
					this.Onmenu_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_menu_name", DbType="NVarChar(50)")]
		public string menu_name
		{
			get
			{
				return this._menu_name;
			}
			set
			{
				if ((this._menu_name != value))
				{
					this.Onmenu_nameChanging(value);
					this.SendPropertyChanging();
					this._menu_name = value;
					this.SendPropertyChanged("menu_name");
					this.Onmenu_nameChanged();
				}
			}
		}
		
		[Column(Storage="_menu_description", DbType="NVarChar(255)")]
		public string menu_description
		{
			get
			{
				return this._menu_description;
			}
			set
			{
				if ((this._menu_description != value))
				{
					this.Onmenu_descriptionChanging(value);
					this.SendPropertyChanging();
					this._menu_description = value;
					this.SendPropertyChanged("menu_description");
					this.Onmenu_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_menu_hidden", DbType="Bit NOT NULL")]
		public bool menu_hidden
		{
			get
			{
				return this._menu_hidden;
			}
			set
			{
				if ((this._menu_hidden != value))
				{
					this.Onmenu_hiddenChanging(value);
					this.SendPropertyChanging();
					this._menu_hidden = value;
					this.SendPropertyChanged("menu_hidden");
					this.Onmenu_hiddenChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_module_id", DbType="Int")]
		public System.Nullable<int> module_id
		{
			get
			{
				return this._module_id;
			}
			set
			{
				if ((this._module_id != value))
				{
					if (this._Module.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodule_idChanging(value);
					this.SendPropertyChanging();
					this._module_id = value;
					this.SendPropertyChanged("module_id");
					this.Onmodule_idChanged();
				}
			}
		}
		
		[Association(Name="Menu_MenuItem", Storage="_MenuItems", ThisKey="menu_id", OtherKey="menu_id")]
		public EntitySet<MenuItem> MenuItems
		{
			get
			{
				return this._MenuItems;
			}
			set
			{
				this._MenuItems.Assign(value);
			}
		}
		
		[Association(Name="Module_Menu", Storage="_Module", ThisKey="module_id", OtherKey="module_id", IsForeignKey=true)]
		public Module Module
		{
			get
			{
				return this._Module.Entity;
			}
			set
			{
				Module previousValue = this._Module.Entity;
				if (((previousValue != value) 
							|| (this._Module.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Module.Entity = null;
						previousValue.Menus.Remove(this);
					}
					this._Module.Entity = value;
					if ((value != null))
					{
						value.Menus.Add(this);
						this._module_id = value.module_id;
					}
					else
					{
						this._module_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Module");
				}
			}
		}
		
		[Association(Name="Language_Menu", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Menus.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Menus.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.Menu = this;
		}
		
		private void detach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.Menu = null;
		}
	}
	
	[Table(Name="dbo.modules")]
	public partial class Module : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _module_id;
		
		private System.DateTime _module_created;
		
		private System.DateTime _module_modified;
		
		private string _module_name;
		
		private string _module_description;
		
		private string _module_link;
		
		private System.Nullable<int> _language_id;
		
		private EntitySet<Gallery> _Galleries;
		
		private EntitySet<Menu> _Menus;
		
		private EntitySet<ModuleTemplate> _ModuleTemplates;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmodule_idChanging(int value);
    partial void Onmodule_idChanged();
    partial void Onmodule_createdChanging(System.DateTime value);
    partial void Onmodule_createdChanged();
    partial void Onmodule_modifiedChanging(System.DateTime value);
    partial void Onmodule_modifiedChanged();
    partial void Onmodule_nameChanging(string value);
    partial void Onmodule_nameChanged();
    partial void Onmodule_descriptionChanging(string value);
    partial void Onmodule_descriptionChanged();
    partial void Onmodule_linkChanging(string value);
    partial void Onmodule_linkChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    #endregion
		
		public Module()
		{
			this._Galleries = new EntitySet<Gallery>(new Action<Gallery>(this.attach_Galleries), new Action<Gallery>(this.detach_Galleries));
			this._Menus = new EntitySet<Menu>(new Action<Menu>(this.attach_Menus), new Action<Menu>(this.detach_Menus));
			this._ModuleTemplates = new EntitySet<ModuleTemplate>(new Action<ModuleTemplate>(this.attach_ModuleTemplates), new Action<ModuleTemplate>(this.detach_ModuleTemplates));
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_module_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int module_id
		{
			get
			{
				return this._module_id;
			}
			set
			{
				if ((this._module_id != value))
				{
					this.Onmodule_idChanging(value);
					this.SendPropertyChanging();
					this._module_id = value;
					this.SendPropertyChanged("module_id");
					this.Onmodule_idChanged();
				}
			}
		}
		
		[Column(Storage="_module_created", DbType="DateTime NOT NULL")]
		public System.DateTime module_created
		{
			get
			{
				return this._module_created;
			}
			set
			{
				if ((this._module_created != value))
				{
					this.Onmodule_createdChanging(value);
					this.SendPropertyChanging();
					this._module_created = value;
					this.SendPropertyChanged("module_created");
					this.Onmodule_createdChanged();
				}
			}
		}
		
		[Column(Storage="_module_modified", DbType="DateTime NOT NULL")]
		public System.DateTime module_modified
		{
			get
			{
				return this._module_modified;
			}
			set
			{
				if ((this._module_modified != value))
				{
					this.Onmodule_modifiedChanging(value);
					this.SendPropertyChanging();
					this._module_modified = value;
					this.SendPropertyChanged("module_modified");
					this.Onmodule_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_module_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string module_name
		{
			get
			{
				return this._module_name;
			}
			set
			{
				if ((this._module_name != value))
				{
					this.Onmodule_nameChanging(value);
					this.SendPropertyChanging();
					this._module_name = value;
					this.SendPropertyChanged("module_name");
					this.Onmodule_nameChanged();
				}
			}
		}
		
		[Column(Storage="_module_description", DbType="NVarChar(255)")]
		public string module_description
		{
			get
			{
				return this._module_description;
			}
			set
			{
				if ((this._module_description != value))
				{
					this.Onmodule_descriptionChanging(value);
					this.SendPropertyChanging();
					this._module_description = value;
					this.SendPropertyChanged("module_description");
					this.Onmodule_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_module_link", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string module_link
		{
			get
			{
				return this._module_link;
			}
			set
			{
				if ((this._module_link != value))
				{
					this.Onmodule_linkChanging(value);
					this.SendPropertyChanging();
					this._module_link = value;
					this.SendPropertyChanged("module_link");
					this.Onmodule_linkChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Association(Name="Module_Gallery", Storage="_Galleries", ThisKey="module_id", OtherKey="module_id")]
		public EntitySet<Gallery> Galleries
		{
			get
			{
				return this._Galleries;
			}
			set
			{
				this._Galleries.Assign(value);
			}
		}
		
		[Association(Name="Module_Menu", Storage="_Menus", ThisKey="module_id", OtherKey="module_id")]
		public EntitySet<Menu> Menus
		{
			get
			{
				return this._Menus;
			}
			set
			{
				this._Menus.Assign(value);
			}
		}
		
		[Association(Name="Module_ModuleTemplate", Storage="_ModuleTemplates", ThisKey="module_id", OtherKey="module_id")]
		public EntitySet<ModuleTemplate> ModuleTemplates
		{
			get
			{
				return this._ModuleTemplates;
			}
			set
			{
				this._ModuleTemplates.Assign(value);
			}
		}
		
		[Association(Name="Language_Module", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Modules.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Modules.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Module = this;
		}
		
		private void detach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Module = null;
		}
		
		private void attach_Menus(Menu entity)
		{
			this.SendPropertyChanging();
			entity.Module = this;
		}
		
		private void detach_Menus(Menu entity)
		{
			this.SendPropertyChanging();
			entity.Module = null;
		}
		
		private void attach_ModuleTemplates(ModuleTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Module = this;
		}
		
		private void detach_ModuleTemplates(ModuleTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Module = null;
		}
	}
	
	[Table(Name="dbo.modules_templates")]
	public partial class ModuleTemplate : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _module_template_id;
		
		private System.DateTime _module_template_created;
		
		private System.DateTime _module_template_modified;
		
		private System.Nullable<int> _module_id;
		
		private System.Nullable<int> _template_id;
		
		private EntityRef<Module> _Module;
		
		private EntityRef<Template> _Template;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmodule_template_idChanging(int value);
    partial void Onmodule_template_idChanged();
    partial void Onmodule_template_createdChanging(System.DateTime value);
    partial void Onmodule_template_createdChanged();
    partial void Onmodule_template_modifiedChanging(System.DateTime value);
    partial void Onmodule_template_modifiedChanged();
    partial void Onmodule_idChanging(System.Nullable<int> value);
    partial void Onmodule_idChanged();
    partial void Ontemplate_idChanging(System.Nullable<int> value);
    partial void Ontemplate_idChanged();
    #endregion
		
		public ModuleTemplate()
		{
			this._Module = default(EntityRef<Module>);
			this._Template = default(EntityRef<Template>);
			OnCreated();
		}
		
		[Column(Storage="_module_template_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int module_template_id
		{
			get
			{
				return this._module_template_id;
			}
			set
			{
				if ((this._module_template_id != value))
				{
					this.Onmodule_template_idChanging(value);
					this.SendPropertyChanging();
					this._module_template_id = value;
					this.SendPropertyChanged("module_template_id");
					this.Onmodule_template_idChanged();
				}
			}
		}
		
		[Column(Storage="_module_template_created", DbType="DateTime NOT NULL")]
		public System.DateTime module_template_created
		{
			get
			{
				return this._module_template_created;
			}
			set
			{
				if ((this._module_template_created != value))
				{
					this.Onmodule_template_createdChanging(value);
					this.SendPropertyChanging();
					this._module_template_created = value;
					this.SendPropertyChanged("module_template_created");
					this.Onmodule_template_createdChanged();
				}
			}
		}
		
		[Column(Storage="_module_template_modified", DbType="DateTime NOT NULL")]
		public System.DateTime module_template_modified
		{
			get
			{
				return this._module_template_modified;
			}
			set
			{
				if ((this._module_template_modified != value))
				{
					this.Onmodule_template_modifiedChanging(value);
					this.SendPropertyChanging();
					this._module_template_modified = value;
					this.SendPropertyChanged("module_template_modified");
					this.Onmodule_template_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_module_id", DbType="Int")]
		public System.Nullable<int> module_id
		{
			get
			{
				return this._module_id;
			}
			set
			{
				if ((this._module_id != value))
				{
					if (this._Module.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodule_idChanging(value);
					this.SendPropertyChanging();
					this._module_id = value;
					this.SendPropertyChanged("module_id");
					this.Onmodule_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_id", DbType="Int")]
		public System.Nullable<int> template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					if (this._Template.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Association(Name="Module_ModuleTemplate", Storage="_Module", ThisKey="module_id", OtherKey="module_id", IsForeignKey=true)]
		public Module Module
		{
			get
			{
				return this._Module.Entity;
			}
			set
			{
				Module previousValue = this._Module.Entity;
				if (((previousValue != value) 
							|| (this._Module.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Module.Entity = null;
						previousValue.ModuleTemplates.Remove(this);
					}
					this._Module.Entity = value;
					if ((value != null))
					{
						value.ModuleTemplates.Add(this);
						this._module_id = value.module_id;
					}
					else
					{
						this._module_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Module");
				}
			}
		}
		
		[Association(Name="Template_ModuleTemplate", Storage="_Template", ThisKey="template_id", OtherKey="template_id", IsForeignKey=true)]
		public Template Template
		{
			get
			{
				return this._Template.Entity;
			}
			set
			{
				Template previousValue = this._Template.Entity;
				if (((previousValue != value) 
							|| (this._Template.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Template.Entity = null;
						previousValue.ModuleTemplates.Remove(this);
					}
					this._Template.Entity = value;
					if ((value != null))
					{
						value.ModuleTemplates.Add(this);
						this._template_id = value.template_id;
					}
					else
					{
						this._template_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Template");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.page_types")]
	public partial class PageType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _page_type_id;
		
		private System.DateTime _page_type_created;
		
		private System.DateTime _page_type_modified;
		
		private string _page_type_name;
		
		private string _page_type_description;
		
		private bool _page_type_editable;
		
		private string _page_type_abbr;
		
		private string _page_type_link;
		
		private System.Nullable<int> _language_id;
		
		private EntitySet<PageTypeAcceptableTemplate> _PageTypeAcceptableTemplates;
		
		private EntitySet<Page> _Pages;
		
		private EntitySet<UserPageType> _UserPageTypes;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onpage_type_idChanging(int value);
    partial void Onpage_type_idChanged();
    partial void Onpage_type_createdChanging(System.DateTime value);
    partial void Onpage_type_createdChanged();
    partial void Onpage_type_modifiedChanging(System.DateTime value);
    partial void Onpage_type_modifiedChanged();
    partial void Onpage_type_nameChanging(string value);
    partial void Onpage_type_nameChanged();
    partial void Onpage_type_descriptionChanging(string value);
    partial void Onpage_type_descriptionChanged();
    partial void Onpage_type_editableChanging(bool value);
    partial void Onpage_type_editableChanged();
    partial void Onpage_type_abbrChanging(string value);
    partial void Onpage_type_abbrChanged();
    partial void Onpage_type_linkChanging(string value);
    partial void Onpage_type_linkChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    #endregion
		
		public PageType()
		{
			this._PageTypeAcceptableTemplates = new EntitySet<PageTypeAcceptableTemplate>(new Action<PageTypeAcceptableTemplate>(this.attach_PageTypeAcceptableTemplates), new Action<PageTypeAcceptableTemplate>(this.detach_PageTypeAcceptableTemplates));
			this._Pages = new EntitySet<Page>(new Action<Page>(this.attach_Pages), new Action<Page>(this.detach_Pages));
			this._UserPageTypes = new EntitySet<UserPageType>(new Action<UserPageType>(this.attach_UserPageTypes), new Action<UserPageType>(this.detach_UserPageTypes));
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_page_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int page_type_id
		{
			get
			{
				return this._page_type_id;
			}
			set
			{
				if ((this._page_type_id != value))
				{
					this.Onpage_type_idChanging(value);
					this.SendPropertyChanging();
					this._page_type_id = value;
					this.SendPropertyChanged("page_type_id");
					this.Onpage_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime page_type_created
		{
			get
			{
				return this._page_type_created;
			}
			set
			{
				if ((this._page_type_created != value))
				{
					this.Onpage_type_createdChanging(value);
					this.SendPropertyChanging();
					this._page_type_created = value;
					this.SendPropertyChanged("page_type_created");
					this.Onpage_type_createdChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime page_type_modified
		{
			get
			{
				return this._page_type_modified;
			}
			set
			{
				if ((this._page_type_modified != value))
				{
					this.Onpage_type_modifiedChanging(value);
					this.SendPropertyChanging();
					this._page_type_modified = value;
					this.SendPropertyChanged("page_type_modified");
					this.Onpage_type_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string page_type_name
		{
			get
			{
				return this._page_type_name;
			}
			set
			{
				if ((this._page_type_name != value))
				{
					this.Onpage_type_nameChanging(value);
					this.SendPropertyChanging();
					this._page_type_name = value;
					this.SendPropertyChanged("page_type_name");
					this.Onpage_type_nameChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_description", DbType="NVarChar(255)")]
		public string page_type_description
		{
			get
			{
				return this._page_type_description;
			}
			set
			{
				if ((this._page_type_description != value))
				{
					this.Onpage_type_descriptionChanging(value);
					this.SendPropertyChanging();
					this._page_type_description = value;
					this.SendPropertyChanged("page_type_description");
					this.Onpage_type_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_editable", DbType="Bit NOT NULL")]
		public bool page_type_editable
		{
			get
			{
				return this._page_type_editable;
			}
			set
			{
				if ((this._page_type_editable != value))
				{
					this.Onpage_type_editableChanging(value);
					this.SendPropertyChanging();
					this._page_type_editable = value;
					this.SendPropertyChanged("page_type_editable");
					this.Onpage_type_editableChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_abbr", DbType="NVarChar(20)")]
		public string page_type_abbr
		{
			get
			{
				return this._page_type_abbr;
			}
			set
			{
				if ((this._page_type_abbr != value))
				{
					this.Onpage_type_abbrChanging(value);
					this.SendPropertyChanging();
					this._page_type_abbr = value;
					this.SendPropertyChanged("page_type_abbr");
					this.Onpage_type_abbrChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_link", DbType="NVarChar(255)")]
		public string page_type_link
		{
			get
			{
				return this._page_type_link;
			}
			set
			{
				if ((this._page_type_link != value))
				{
					this.Onpage_type_linkChanging(value);
					this.SendPropertyChanging();
					this._page_type_link = value;
					this.SendPropertyChanged("page_type_link");
					this.Onpage_type_linkChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Association(Name="PageType_PageTypeAcceptableTemplate", Storage="_PageTypeAcceptableTemplates", ThisKey="page_type_id", OtherKey="page_type_id")]
		public EntitySet<PageTypeAcceptableTemplate> PageTypeAcceptableTemplates
		{
			get
			{
				return this._PageTypeAcceptableTemplates;
			}
			set
			{
				this._PageTypeAcceptableTemplates.Assign(value);
			}
		}
		
		[Association(Name="PageType_Page", Storage="_Pages", ThisKey="page_type_id", OtherKey="page_type_id")]
		public EntitySet<Page> Pages
		{
			get
			{
				return this._Pages;
			}
			set
			{
				this._Pages.Assign(value);
			}
		}
		
		[Association(Name="PageType_UserPageType", Storage="_UserPageTypes", ThisKey="page_type_id", OtherKey="page_type_id")]
		public EntitySet<UserPageType> UserPageTypes
		{
			get
			{
				return this._UserPageTypes;
			}
			set
			{
				this._UserPageTypes.Assign(value);
			}
		}
		
		[Association(Name="Language_PageType", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.PageTypes.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.PageTypes.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_PageTypeAcceptableTemplates(PageTypeAcceptableTemplate entity)
		{
			this.SendPropertyChanging();
			entity.PageType = this;
		}
		
		private void detach_PageTypeAcceptableTemplates(PageTypeAcceptableTemplate entity)
		{
			this.SendPropertyChanging();
			entity.PageType = null;
		}
		
		private void attach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.PageType = this;
		}
		
		private void detach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.PageType = null;
		}
		
		private void attach_UserPageTypes(UserPageType entity)
		{
			this.SendPropertyChanging();
			entity.PageType = this;
		}
		
		private void detach_UserPageTypes(UserPageType entity)
		{
			this.SendPropertyChanging();
			entity.PageType = null;
		}
	}
	
	[Table(Name="dbo.page_types_acceptable_templates")]
	public partial class PageTypeAcceptableTemplate : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _page_type_template_id;
		
		private System.DateTime _page_type_template_created;
		
		private System.DateTime _page_type_template_modified;
		
		private System.Nullable<int> _page_type_id;
		
		private System.Nullable<int> _template_id;
		
		private EntityRef<PageType> _PageType;
		
		private EntityRef<Template> _Template;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onpage_type_template_idChanging(int value);
    partial void Onpage_type_template_idChanged();
    partial void Onpage_type_template_createdChanging(System.DateTime value);
    partial void Onpage_type_template_createdChanged();
    partial void Onpage_type_template_modifiedChanging(System.DateTime value);
    partial void Onpage_type_template_modifiedChanged();
    partial void Onpage_type_idChanging(System.Nullable<int> value);
    partial void Onpage_type_idChanged();
    partial void Ontemplate_idChanging(System.Nullable<int> value);
    partial void Ontemplate_idChanged();
    #endregion
		
		public PageTypeAcceptableTemplate()
		{
			this._PageType = default(EntityRef<PageType>);
			this._Template = default(EntityRef<Template>);
			OnCreated();
		}
		
		[Column(Storage="_page_type_template_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int page_type_template_id
		{
			get
			{
				return this._page_type_template_id;
			}
			set
			{
				if ((this._page_type_template_id != value))
				{
					this.Onpage_type_template_idChanging(value);
					this.SendPropertyChanging();
					this._page_type_template_id = value;
					this.SendPropertyChanged("page_type_template_id");
					this.Onpage_type_template_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_template_created", DbType="DateTime NOT NULL")]
		public System.DateTime page_type_template_created
		{
			get
			{
				return this._page_type_template_created;
			}
			set
			{
				if ((this._page_type_template_created != value))
				{
					this.Onpage_type_template_createdChanging(value);
					this.SendPropertyChanging();
					this._page_type_template_created = value;
					this.SendPropertyChanged("page_type_template_created");
					this.Onpage_type_template_createdChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_template_modified", DbType="DateTime NOT NULL")]
		public System.DateTime page_type_template_modified
		{
			get
			{
				return this._page_type_template_modified;
			}
			set
			{
				if ((this._page_type_template_modified != value))
				{
					this.Onpage_type_template_modifiedChanging(value);
					this.SendPropertyChanging();
					this._page_type_template_modified = value;
					this.SendPropertyChanged("page_type_template_modified");
					this.Onpage_type_template_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_id", DbType="Int")]
		public System.Nullable<int> page_type_id
		{
			get
			{
				return this._page_type_id;
			}
			set
			{
				if ((this._page_type_id != value))
				{
					if (this._PageType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_type_idChanging(value);
					this.SendPropertyChanging();
					this._page_type_id = value;
					this.SendPropertyChanged("page_type_id");
					this.Onpage_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_id", DbType="Int")]
		public System.Nullable<int> template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					if (this._Template.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Association(Name="PageType_PageTypeAcceptableTemplate", Storage="_PageType", ThisKey="page_type_id", OtherKey="page_type_id", IsForeignKey=true)]
		public PageType PageType
		{
			get
			{
				return this._PageType.Entity;
			}
			set
			{
				PageType previousValue = this._PageType.Entity;
				if (((previousValue != value) 
							|| (this._PageType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._PageType.Entity = null;
						previousValue.PageTypeAcceptableTemplates.Remove(this);
					}
					this._PageType.Entity = value;
					if ((value != null))
					{
						value.PageTypeAcceptableTemplates.Add(this);
						this._page_type_id = value.page_type_id;
					}
					else
					{
						this._page_type_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("PageType");
				}
			}
		}
		
		[Association(Name="Template_PageTypeAcceptableTemplate", Storage="_Template", ThisKey="template_id", OtherKey="template_id", IsForeignKey=true)]
		public Template Template
		{
			get
			{
				return this._Template.Entity;
			}
			set
			{
				Template previousValue = this._Template.Entity;
				if (((previousValue != value) 
							|| (this._Template.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Template.Entity = null;
						previousValue.PageTypeAcceptableTemplates.Remove(this);
					}
					this._Template.Entity = value;
					if ((value != null))
					{
						value.PageTypeAcceptableTemplates.Add(this);
						this._template_id = value.template_id;
					}
					else
					{
						this._template_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Template");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.pages")]
	public partial class Page : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _page_id;
		
		private System.DateTime _page_created;
		
		private System.DateTime _page_modified;
		
		private string _page_name;
		
		private string _page_alias;
		
		private int _page_ordering;
		
		private bool _page_published;
		
		private string _page_link;
		
		private string _page_img;
		
		private System.Nullable<int> _page_type_id;
		
		private System.Nullable<int> _page_created_by_id;
		
		private System.Nullable<int> _page_modified_by_id;
		
		private System.Nullable<int> _template_id;
		
		private System.Nullable<int> _language_id;
		
		private string _page_meta;
		
		private string _page_keywords;
		
		private bool _page_editable;
		
		private bool _page_removable;
		
		private EntitySet<GalleryImage> _GalleryImages;
		
		private EntitySet<MenuItem> _MenuItems;
		
		private EntitySet<VariableValue> _VariableValues;
		
		private EntityRef<PageType> _PageType;
		
		private EntityRef<Template> _Template;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onpage_idChanging(int value);
    partial void Onpage_idChanged();
    partial void Onpage_createdChanging(System.DateTime value);
    partial void Onpage_createdChanged();
    partial void Onpage_modifiedChanging(System.DateTime value);
    partial void Onpage_modifiedChanged();
    partial void Onpage_nameChanging(string value);
    partial void Onpage_nameChanged();
    partial void Onpage_aliasChanging(string value);
    partial void Onpage_aliasChanged();
    partial void Onpage_orderingChanging(int value);
    partial void Onpage_orderingChanged();
    partial void Onpage_publishedChanging(bool value);
    partial void Onpage_publishedChanged();
    partial void Onpage_linkChanging(string value);
    partial void Onpage_linkChanged();
    partial void Onpage_imgChanging(string value);
    partial void Onpage_imgChanged();
    partial void Onpage_type_idChanging(System.Nullable<int> value);
    partial void Onpage_type_idChanged();
    partial void Onpage_created_by_idChanging(System.Nullable<int> value);
    partial void Onpage_created_by_idChanged();
    partial void Onpage_modified_by_idChanging(System.Nullable<int> value);
    partial void Onpage_modified_by_idChanged();
    partial void Ontemplate_idChanging(System.Nullable<int> value);
    partial void Ontemplate_idChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Onpage_metaChanging(string value);
    partial void Onpage_metaChanged();
    partial void Onpage_keywordsChanging(string value);
    partial void Onpage_keywordsChanged();
    partial void Onpage_editableChanging(bool value);
    partial void Onpage_editableChanged();
    partial void Onpage_removableChanging(bool value);
    partial void Onpage_removableChanged();
    #endregion
		
		public Page()
		{
			this._GalleryImages = new EntitySet<GalleryImage>(new Action<GalleryImage>(this.attach_GalleryImages), new Action<GalleryImage>(this.detach_GalleryImages));
			this._MenuItems = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems), new Action<MenuItem>(this.detach_MenuItems));
			this._VariableValues = new EntitySet<VariableValue>(new Action<VariableValue>(this.attach_VariableValues), new Action<VariableValue>(this.detach_VariableValues));
			this._PageType = default(EntityRef<PageType>);
			this._Template = default(EntityRef<Template>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_page_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int page_id
		{
			get
			{
				return this._page_id;
			}
			set
			{
				if ((this._page_id != value))
				{
					this.Onpage_idChanging(value);
					this.SendPropertyChanging();
					this._page_id = value;
					this.SendPropertyChanged("page_id");
					this.Onpage_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_created", DbType="DateTime NOT NULL")]
		public System.DateTime page_created
		{
			get
			{
				return this._page_created;
			}
			set
			{
				if ((this._page_created != value))
				{
					this.Onpage_createdChanging(value);
					this.SendPropertyChanging();
					this._page_created = value;
					this.SendPropertyChanged("page_created");
					this.Onpage_createdChanged();
				}
			}
		}
		
		[Column(Storage="_page_modified", DbType="DateTime NOT NULL")]
		public System.DateTime page_modified
		{
			get
			{
				return this._page_modified;
			}
			set
			{
				if ((this._page_modified != value))
				{
					this.Onpage_modifiedChanging(value);
					this.SendPropertyChanging();
					this._page_modified = value;
					this.SendPropertyChanged("page_modified");
					this.Onpage_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_page_name", DbType="NVarChar(190) NOT NULL", CanBeNull=false)]
		public string page_name
		{
			get
			{
				return this._page_name;
			}
			set
			{
				if ((this._page_name != value))
				{
					this.Onpage_nameChanging(value);
					this.SendPropertyChanging();
					this._page_name = value;
					this.SendPropertyChanged("page_name");
					this.Onpage_nameChanged();
				}
			}
		}
		
		[Column(Storage="_page_alias", DbType="NVarChar(190) NOT NULL", CanBeNull=false)]
		public string page_alias
		{
			get
			{
				return this._page_alias;
			}
			set
			{
				if ((this._page_alias != value))
				{
					this.Onpage_aliasChanging(value);
					this.SendPropertyChanging();
					this._page_alias = value;
					this.SendPropertyChanged("page_alias");
					this.Onpage_aliasChanged();
				}
			}
		}
		
		[Column(Storage="_page_ordering", DbType="Int NOT NULL")]
		public int page_ordering
		{
			get
			{
				return this._page_ordering;
			}
			set
			{
				if ((this._page_ordering != value))
				{
					this.Onpage_orderingChanging(value);
					this.SendPropertyChanging();
					this._page_ordering = value;
					this.SendPropertyChanged("page_ordering");
					this.Onpage_orderingChanged();
				}
			}
		}
		
		[Column(Storage="_page_published", DbType="Bit NOT NULL")]
		public bool page_published
		{
			get
			{
				return this._page_published;
			}
			set
			{
				if ((this._page_published != value))
				{
					this.Onpage_publishedChanging(value);
					this.SendPropertyChanging();
					this._page_published = value;
					this.SendPropertyChanged("page_published");
					this.Onpage_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_page_link", DbType="NVarChar(190)")]
		public string page_link
		{
			get
			{
				return this._page_link;
			}
			set
			{
				if ((this._page_link != value))
				{
					this.Onpage_linkChanging(value);
					this.SendPropertyChanging();
					this._page_link = value;
					this.SendPropertyChanged("page_link");
					this.Onpage_linkChanged();
				}
			}
		}
		
		[Column(Storage="_page_img", DbType="NVarChar(100)")]
		public string page_img
		{
			get
			{
				return this._page_img;
			}
			set
			{
				if ((this._page_img != value))
				{
					this.Onpage_imgChanging(value);
					this.SendPropertyChanging();
					this._page_img = value;
					this.SendPropertyChanged("page_img");
					this.Onpage_imgChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_id", DbType="Int")]
		public System.Nullable<int> page_type_id
		{
			get
			{
				return this._page_type_id;
			}
			set
			{
				if ((this._page_type_id != value))
				{
					if (this._PageType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_type_idChanging(value);
					this.SendPropertyChanging();
					this._page_type_id = value;
					this.SendPropertyChanged("page_type_id");
					this.Onpage_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_created_by_id", DbType="Int")]
		public System.Nullable<int> page_created_by_id
		{
			get
			{
				return this._page_created_by_id;
			}
			set
			{
				if ((this._page_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._page_created_by_id = value;
					this.SendPropertyChanged("page_created_by_id");
					this.Onpage_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_modified_by_id", DbType="Int")]
		public System.Nullable<int> page_modified_by_id
		{
			get
			{
				return this._page_modified_by_id;
			}
			set
			{
				if ((this._page_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._page_modified_by_id = value;
					this.SendPropertyChanged("page_modified_by_id");
					this.Onpage_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_id", DbType="Int")]
		public System.Nullable<int> template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					if (this._Template.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_meta", DbType="NVarChar(MAX)")]
		public string page_meta
		{
			get
			{
				return this._page_meta;
			}
			set
			{
				if ((this._page_meta != value))
				{
					this.Onpage_metaChanging(value);
					this.SendPropertyChanging();
					this._page_meta = value;
					this.SendPropertyChanged("page_meta");
					this.Onpage_metaChanged();
				}
			}
		}
		
		[Column(Storage="_page_keywords", DbType="NVarChar(MAX)")]
		public string page_keywords
		{
			get
			{
				return this._page_keywords;
			}
			set
			{
				if ((this._page_keywords != value))
				{
					this.Onpage_keywordsChanging(value);
					this.SendPropertyChanging();
					this._page_keywords = value;
					this.SendPropertyChanged("page_keywords");
					this.Onpage_keywordsChanged();
				}
			}
		}
		
		[Column(Storage="_page_editable", DbType="Bit NOT NULL")]
		public bool page_editable
		{
			get
			{
				return this._page_editable;
			}
			set
			{
				if ((this._page_editable != value))
				{
					this.Onpage_editableChanging(value);
					this.SendPropertyChanging();
					this._page_editable = value;
					this.SendPropertyChanged("page_editable");
					this.Onpage_editableChanged();
				}
			}
		}
		
		[Column(Storage="_page_removable", DbType="Bit NOT NULL")]
		public bool page_removable
		{
			get
			{
				return this._page_removable;
			}
			set
			{
				if ((this._page_removable != value))
				{
					this.Onpage_removableChanging(value);
					this.SendPropertyChanging();
					this._page_removable = value;
					this.SendPropertyChanged("page_removable");
					this.Onpage_removableChanged();
				}
			}
		}
		
		[Association(Name="Page_GalleryImage", Storage="_GalleryImages", ThisKey="page_id", OtherKey="page_id")]
		public EntitySet<GalleryImage> GalleryImages
		{
			get
			{
				return this._GalleryImages;
			}
			set
			{
				this._GalleryImages.Assign(value);
			}
		}
		
		[Association(Name="Page_MenuItem", Storage="_MenuItems", ThisKey="page_id", OtherKey="page_id")]
		public EntitySet<MenuItem> MenuItems
		{
			get
			{
				return this._MenuItems;
			}
			set
			{
				this._MenuItems.Assign(value);
			}
		}
		
		[Association(Name="Page_VariableValue", Storage="_VariableValues", ThisKey="page_id", OtherKey="page_id")]
		public EntitySet<VariableValue> VariableValues
		{
			get
			{
				return this._VariableValues;
			}
			set
			{
				this._VariableValues.Assign(value);
			}
		}
		
		[Association(Name="PageType_Page", Storage="_PageType", ThisKey="page_type_id", OtherKey="page_type_id", IsForeignKey=true)]
		public PageType PageType
		{
			get
			{
				return this._PageType.Entity;
			}
			set
			{
				PageType previousValue = this._PageType.Entity;
				if (((previousValue != value) 
							|| (this._PageType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._PageType.Entity = null;
						previousValue.Pages.Remove(this);
					}
					this._PageType.Entity = value;
					if ((value != null))
					{
						value.Pages.Add(this);
						this._page_type_id = value.page_type_id;
					}
					else
					{
						this._page_type_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("PageType");
				}
			}
		}
		
		[Association(Name="Template_Page", Storage="_Template", ThisKey="template_id", OtherKey="template_id", IsForeignKey=true)]
		public Template Template
		{
			get
			{
				return this._Template.Entity;
			}
			set
			{
				Template previousValue = this._Template.Entity;
				if (((previousValue != value) 
							|| (this._Template.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Template.Entity = null;
						previousValue.Pages.Remove(this);
					}
					this._Template.Entity = value;
					if ((value != null))
					{
						value.Pages.Add(this);
						this._template_id = value.template_id;
					}
					else
					{
						this._template_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Template");
				}
			}
		}
		
		[Association(Name="User_Page", Storage="_user", ThisKey="page_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.Pages.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.Pages.Add(this);
						this._page_created_by_id = value.user_id;
					}
					else
					{
						this._page_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_Page1", Storage="_User1", ThisKey="page_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.Pages1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.Pages1.Add(this);
						this._page_modified_by_id = value.user_id;
					}
					else
					{
						this._page_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		[Association(Name="Language_Page", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Pages.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Pages.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Page = this;
		}
		
		private void detach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Page = null;
		}
		
		private void attach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.Page = this;
		}
		
		private void detach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.Page = null;
		}
		
		private void attach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.Page = this;
		}
		
		private void detach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.Page = null;
		}
	}
	
	[Table(Name="dbo.templates")]
	public partial class Template : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _template_id;
		
		private System.DateTime _template_created;
		
		private System.DateTime _template_modified;
		
		private string _template_name;
		
		private string _template_path;
		
		private string _template_description;
		
		private bool _template_active;
		
		private System.Nullable<int> _language_id;
		
		private bool _template_hidden;
		
		private EntitySet<Gallery> _Galleries;
		
		private EntitySet<ModuleTemplate> _ModuleTemplates;
		
		private EntitySet<PageTypeAcceptableTemplate> _PageTypeAcceptableTemplates;
		
		private EntitySet<Page> _Pages;
		
		private EntitySet<Variable> _Variables;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontemplate_idChanging(int value);
    partial void Ontemplate_idChanged();
    partial void Ontemplate_createdChanging(System.DateTime value);
    partial void Ontemplate_createdChanged();
    partial void Ontemplate_modifiedChanging(System.DateTime value);
    partial void Ontemplate_modifiedChanged();
    partial void Ontemplate_nameChanging(string value);
    partial void Ontemplate_nameChanged();
    partial void Ontemplate_pathChanging(string value);
    partial void Ontemplate_pathChanged();
    partial void Ontemplate_descriptionChanging(string value);
    partial void Ontemplate_descriptionChanged();
    partial void Ontemplate_activeChanging(bool value);
    partial void Ontemplate_activeChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Ontemplate_hiddenChanging(bool value);
    partial void Ontemplate_hiddenChanged();
    #endregion
		
		public Template()
		{
			this._Galleries = new EntitySet<Gallery>(new Action<Gallery>(this.attach_Galleries), new Action<Gallery>(this.detach_Galleries));
			this._ModuleTemplates = new EntitySet<ModuleTemplate>(new Action<ModuleTemplate>(this.attach_ModuleTemplates), new Action<ModuleTemplate>(this.detach_ModuleTemplates));
			this._PageTypeAcceptableTemplates = new EntitySet<PageTypeAcceptableTemplate>(new Action<PageTypeAcceptableTemplate>(this.attach_PageTypeAcceptableTemplates), new Action<PageTypeAcceptableTemplate>(this.detach_PageTypeAcceptableTemplates));
			this._Pages = new EntitySet<Page>(new Action<Page>(this.attach_Pages), new Action<Page>(this.detach_Pages));
			this._Variables = new EntitySet<Variable>(new Action<Variable>(this.attach_Variables), new Action<Variable>(this.detach_Variables));
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_template_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_created", DbType="DateTime NOT NULL")]
		public System.DateTime template_created
		{
			get
			{
				return this._template_created;
			}
			set
			{
				if ((this._template_created != value))
				{
					this.Ontemplate_createdChanging(value);
					this.SendPropertyChanging();
					this._template_created = value;
					this.SendPropertyChanged("template_created");
					this.Ontemplate_createdChanged();
				}
			}
		}
		
		[Column(Storage="_template_modified", DbType="DateTime NOT NULL")]
		public System.DateTime template_modified
		{
			get
			{
				return this._template_modified;
			}
			set
			{
				if ((this._template_modified != value))
				{
					this.Ontemplate_modifiedChanging(value);
					this.SendPropertyChanging();
					this._template_modified = value;
					this.SendPropertyChanged("template_modified");
					this.Ontemplate_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_template_name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string template_name
		{
			get
			{
				return this._template_name;
			}
			set
			{
				if ((this._template_name != value))
				{
					this.Ontemplate_nameChanging(value);
					this.SendPropertyChanging();
					this._template_name = value;
					this.SendPropertyChanged("template_name");
					this.Ontemplate_nameChanged();
				}
			}
		}
		
		[Column(Storage="_template_path", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string template_path
		{
			get
			{
				return this._template_path;
			}
			set
			{
				if ((this._template_path != value))
				{
					this.Ontemplate_pathChanging(value);
					this.SendPropertyChanging();
					this._template_path = value;
					this.SendPropertyChanged("template_path");
					this.Ontemplate_pathChanged();
				}
			}
		}
		
		[Column(Storage="_template_description", DbType="NVarChar(255)")]
		public string template_description
		{
			get
			{
				return this._template_description;
			}
			set
			{
				if ((this._template_description != value))
				{
					this.Ontemplate_descriptionChanging(value);
					this.SendPropertyChanging();
					this._template_description = value;
					this.SendPropertyChanged("template_description");
					this.Ontemplate_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_template_active", DbType="Bit NOT NULL")]
		public bool template_active
		{
			get
			{
				return this._template_active;
			}
			set
			{
				if ((this._template_active != value))
				{
					this.Ontemplate_activeChanging(value);
					this.SendPropertyChanging();
					this._template_active = value;
					this.SendPropertyChanged("template_active");
					this.Ontemplate_activeChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_hidden", DbType="Bit NOT NULL")]
		public bool template_hidden
		{
			get
			{
				return this._template_hidden;
			}
			set
			{
				if ((this._template_hidden != value))
				{
					this.Ontemplate_hiddenChanging(value);
					this.SendPropertyChanging();
					this._template_hidden = value;
					this.SendPropertyChanged("template_hidden");
					this.Ontemplate_hiddenChanged();
				}
			}
		}
		
		[Association(Name="Template_Gallery", Storage="_Galleries", ThisKey="template_id", OtherKey="template_id")]
		public EntitySet<Gallery> Galleries
		{
			get
			{
				return this._Galleries;
			}
			set
			{
				this._Galleries.Assign(value);
			}
		}
		
		[Association(Name="Template_ModuleTemplate", Storage="_ModuleTemplates", ThisKey="template_id", OtherKey="template_id")]
		public EntitySet<ModuleTemplate> ModuleTemplates
		{
			get
			{
				return this._ModuleTemplates;
			}
			set
			{
				this._ModuleTemplates.Assign(value);
			}
		}
		
		[Association(Name="Template_PageTypeAcceptableTemplate", Storage="_PageTypeAcceptableTemplates", ThisKey="template_id", OtherKey="template_id")]
		public EntitySet<PageTypeAcceptableTemplate> PageTypeAcceptableTemplates
		{
			get
			{
				return this._PageTypeAcceptableTemplates;
			}
			set
			{
				this._PageTypeAcceptableTemplates.Assign(value);
			}
		}
		
		[Association(Name="Template_Page", Storage="_Pages", ThisKey="template_id", OtherKey="template_id")]
		public EntitySet<Page> Pages
		{
			get
			{
				return this._Pages;
			}
			set
			{
				this._Pages.Assign(value);
			}
		}
		
		[Association(Name="Template_Variable", Storage="_Variables", ThisKey="template_id", OtherKey="template_id")]
		public EntitySet<Variable> Variables
		{
			get
			{
				return this._Variables;
			}
			set
			{
				this._Variables.Assign(value);
			}
		}
		
		[Association(Name="Language_Template", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Templates.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Templates.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Template = this;
		}
		
		private void detach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Template = null;
		}
		
		private void attach_ModuleTemplates(ModuleTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Template = this;
		}
		
		private void detach_ModuleTemplates(ModuleTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Template = null;
		}
		
		private void attach_PageTypeAcceptableTemplates(PageTypeAcceptableTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Template = this;
		}
		
		private void detach_PageTypeAcceptableTemplates(PageTypeAcceptableTemplate entity)
		{
			this.SendPropertyChanging();
			entity.Template = null;
		}
		
		private void attach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.Template = this;
		}
		
		private void detach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.Template = null;
		}
		
		private void attach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.Template = this;
		}
		
		private void detach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.Template = null;
		}
	}
	
	[Table(Name="dbo.variable_types")]
	public partial class VariableType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _variable_type_id;
		
		private System.DateTime _variable_type_created;
		
		private System.DateTime _variable_type_modified;
		
		private string _variable_type_name;
		
		private string _variable_type_img;
		
		private string _variable_type_description;
		
		private bool _variable_type_hidden;
		
		private EntitySet<Variable> _Variables;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onvariable_type_idChanging(int value);
    partial void Onvariable_type_idChanged();
    partial void Onvariable_type_createdChanging(System.DateTime value);
    partial void Onvariable_type_createdChanged();
    partial void Onvariable_type_modifiedChanging(System.DateTime value);
    partial void Onvariable_type_modifiedChanged();
    partial void Onvariable_type_nameChanging(string value);
    partial void Onvariable_type_nameChanged();
    partial void Onvariable_type_imgChanging(string value);
    partial void Onvariable_type_imgChanged();
    partial void Onvariable_type_descriptionChanging(string value);
    partial void Onvariable_type_descriptionChanged();
    partial void Onvariable_type_hiddenChanging(bool value);
    partial void Onvariable_type_hiddenChanged();
    #endregion
		
		public VariableType()
		{
			this._Variables = new EntitySet<Variable>(new Action<Variable>(this.attach_Variables), new Action<Variable>(this.detach_Variables));
			OnCreated();
		}
		
		[Column(Storage="_variable_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int variable_type_id
		{
			get
			{
				return this._variable_type_id;
			}
			set
			{
				if ((this._variable_type_id != value))
				{
					this.Onvariable_type_idChanging(value);
					this.SendPropertyChanging();
					this._variable_type_id = value;
					this.SendPropertyChanged("variable_type_id");
					this.Onvariable_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime variable_type_created
		{
			get
			{
				return this._variable_type_created;
			}
			set
			{
				if ((this._variable_type_created != value))
				{
					this.Onvariable_type_createdChanging(value);
					this.SendPropertyChanging();
					this._variable_type_created = value;
					this.SendPropertyChanged("variable_type_created");
					this.Onvariable_type_createdChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime variable_type_modified
		{
			get
			{
				return this._variable_type_modified;
			}
			set
			{
				if ((this._variable_type_modified != value))
				{
					this.Onvariable_type_modifiedChanging(value);
					this.SendPropertyChanging();
					this._variable_type_modified = value;
					this.SendPropertyChanged("variable_type_modified");
					this.Onvariable_type_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string variable_type_name
		{
			get
			{
				return this._variable_type_name;
			}
			set
			{
				if ((this._variable_type_name != value))
				{
					this.Onvariable_type_nameChanging(value);
					this.SendPropertyChanging();
					this._variable_type_name = value;
					this.SendPropertyChanged("variable_type_name");
					this.Onvariable_type_nameChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_img", DbType="NVarChar(100)")]
		public string variable_type_img
		{
			get
			{
				return this._variable_type_img;
			}
			set
			{
				if ((this._variable_type_img != value))
				{
					this.Onvariable_type_imgChanging(value);
					this.SendPropertyChanging();
					this._variable_type_img = value;
					this.SendPropertyChanged("variable_type_img");
					this.Onvariable_type_imgChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_description", DbType="NVarChar(255)")]
		public string variable_type_description
		{
			get
			{
				return this._variable_type_description;
			}
			set
			{
				if ((this._variable_type_description != value))
				{
					this.Onvariable_type_descriptionChanging(value);
					this.SendPropertyChanging();
					this._variable_type_description = value;
					this.SendPropertyChanged("variable_type_description");
					this.Onvariable_type_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_hidden", DbType="Bit NOT NULL")]
		public bool variable_type_hidden
		{
			get
			{
				return this._variable_type_hidden;
			}
			set
			{
				if ((this._variable_type_hidden != value))
				{
					this.Onvariable_type_hiddenChanging(value);
					this.SendPropertyChanging();
					this._variable_type_hidden = value;
					this.SendPropertyChanged("variable_type_hidden");
					this.Onvariable_type_hiddenChanged();
				}
			}
		}
		
		[Association(Name="VariableType_Variable", Storage="_Variables", ThisKey="variable_type_id", OtherKey="variable_type_id")]
		public EntitySet<Variable> Variables
		{
			get
			{
				return this._Variables;
			}
			set
			{
				this._Variables.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.VariableType = this;
		}
		
		private void detach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.VariableType = null;
		}
	}
	
	[Table(Name="dbo.variable_values")]
	public partial class VariableValue : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _variable_value_id;
		
		private System.DateTime _variable_value_created;
		
		private System.DateTime _variable_value_modified;
		
		private bool _variable_value_published;
		
		private string _variable_value1;
		
		private int _variable_id;
		
		private int _page_id;
		
		private System.Nullable<int> _variable_value_created_by_id;
		
		private System.Nullable<int> _variable_value_modified_by_id;
		
		private EntityRef<Page> _Page;
		
		private EntityRef<Variable> _Variable;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onvariable_value_idChanging(int value);
    partial void Onvariable_value_idChanged();
    partial void Onvariable_value_createdChanging(System.DateTime value);
    partial void Onvariable_value_createdChanged();
    partial void Onvariable_value_modifiedChanging(System.DateTime value);
    partial void Onvariable_value_modifiedChanged();
    partial void Onvariable_value_publishedChanging(bool value);
    partial void Onvariable_value_publishedChanged();
    partial void Onvariable_valueChanging(string value);
    partial void Onvariable_valueChanged();
    partial void Onvariable_idChanging(int value);
    partial void Onvariable_idChanged();
    partial void Onpage_idChanging(int value);
    partial void Onpage_idChanged();
    partial void Onvariable_value_created_by_idChanging(System.Nullable<int> value);
    partial void Onvariable_value_created_by_idChanged();
    partial void Onvariable_value_modified_by_idChanging(System.Nullable<int> value);
    partial void Onvariable_value_modified_by_idChanged();
    #endregion
		
		public VariableValue()
		{
			this._Page = default(EntityRef<Page>);
			this._Variable = default(EntityRef<Variable>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			OnCreated();
		}
		
		[Column(Storage="_variable_value_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int variable_value_id
		{
			get
			{
				return this._variable_value_id;
			}
			set
			{
				if ((this._variable_value_id != value))
				{
					this.Onvariable_value_idChanging(value);
					this.SendPropertyChanging();
					this._variable_value_id = value;
					this.SendPropertyChanged("variable_value_id");
					this.Onvariable_value_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value_created", DbType="DateTime NOT NULL")]
		public System.DateTime variable_value_created
		{
			get
			{
				return this._variable_value_created;
			}
			set
			{
				if ((this._variable_value_created != value))
				{
					this.Onvariable_value_createdChanging(value);
					this.SendPropertyChanging();
					this._variable_value_created = value;
					this.SendPropertyChanged("variable_value_created");
					this.Onvariable_value_createdChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value_modified", DbType="DateTime NOT NULL")]
		public System.DateTime variable_value_modified
		{
			get
			{
				return this._variable_value_modified;
			}
			set
			{
				if ((this._variable_value_modified != value))
				{
					this.Onvariable_value_modifiedChanging(value);
					this.SendPropertyChanging();
					this._variable_value_modified = value;
					this.SendPropertyChanged("variable_value_modified");
					this.Onvariable_value_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value_published", DbType="Bit NOT NULL")]
		public bool variable_value_published
		{
			get
			{
				return this._variable_value_published;
			}
			set
			{
				if ((this._variable_value_published != value))
				{
					this.Onvariable_value_publishedChanging(value);
					this.SendPropertyChanging();
					this._variable_value_published = value;
					this.SendPropertyChanged("variable_value_published");
					this.Onvariable_value_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value1", DbType="NVarChar(MAX)")]
		public string variable_value
		{
			get
			{
				return this._variable_value1;
			}
			set
			{
				if ((this._variable_value1 != value))
				{
					this.Onvariable_valueChanging(value);
					this.SendPropertyChanging();
					this._variable_value1 = value;
					this.SendPropertyChanged("variable_value");
					this.Onvariable_valueChanged();
				}
			}
		}
		
		[Column(Storage="_variable_id", DbType="Int NOT NULL")]
		public int variable_id
		{
			get
			{
				return this._variable_id;
			}
			set
			{
				if ((this._variable_id != value))
				{
					if (this._Variable.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_idChanging(value);
					this.SendPropertyChanging();
					this._variable_id = value;
					this.SendPropertyChanged("variable_id");
					this.Onvariable_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_id", DbType="Int NOT NULL")]
		public int page_id
		{
			get
			{
				return this._page_id;
			}
			set
			{
				if ((this._page_id != value))
				{
					if (this._Page.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_idChanging(value);
					this.SendPropertyChanging();
					this._page_id = value;
					this.SendPropertyChanged("page_id");
					this.Onpage_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value_created_by_id", DbType="Int")]
		public System.Nullable<int> variable_value_created_by_id
		{
			get
			{
				return this._variable_value_created_by_id;
			}
			set
			{
				if ((this._variable_value_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_value_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._variable_value_created_by_id = value;
					this.SendPropertyChanged("variable_value_created_by_id");
					this.Onvariable_value_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_value_modified_by_id", DbType="Int")]
		public System.Nullable<int> variable_value_modified_by_id
		{
			get
			{
				return this._variable_value_modified_by_id;
			}
			set
			{
				if ((this._variable_value_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_value_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._variable_value_modified_by_id = value;
					this.SendPropertyChanged("variable_value_modified_by_id");
					this.Onvariable_value_modified_by_idChanged();
				}
			}
		}
		
		[Association(Name="Page_VariableValue", Storage="_Page", ThisKey="page_id", OtherKey="page_id", IsForeignKey=true)]
		public Page Page
		{
			get
			{
				return this._Page.Entity;
			}
			set
			{
				Page previousValue = this._Page.Entity;
				if (((previousValue != value) 
							|| (this._Page.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Page.Entity = null;
						previousValue.VariableValues.Remove(this);
					}
					this._Page.Entity = value;
					if ((value != null))
					{
						value.VariableValues.Add(this);
						this._page_id = value.page_id;
					}
					else
					{
						this._page_id = default(int);
					}
					this.SendPropertyChanged("Page");
				}
			}
		}
		
		[Association(Name="Variable_VariableValue", Storage="_Variable", ThisKey="variable_id", OtherKey="variable_id", IsForeignKey=true)]
		public Variable Variable
		{
			get
			{
				return this._Variable.Entity;
			}
			set
			{
				Variable previousValue = this._Variable.Entity;
				if (((previousValue != value) 
							|| (this._Variable.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Variable.Entity = null;
						previousValue.VariableValues.Remove(this);
					}
					this._Variable.Entity = value;
					if ((value != null))
					{
						value.VariableValues.Add(this);
						this._variable_id = value.variable_id;
					}
					else
					{
						this._variable_id = default(int);
					}
					this.SendPropertyChanged("Variable");
				}
			}
		}
		
		[Association(Name="User_VariableValue", Storage="_user", ThisKey="variable_value_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.VariableValues.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.VariableValues.Add(this);
						this._variable_value_created_by_id = value.user_id;
					}
					else
					{
						this._variable_value_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_VariableValue1", Storage="_User1", ThisKey="variable_value_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.VariableValues1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.VariableValues1.Add(this);
						this._variable_value_modified_by_id = value.user_id;
					}
					else
					{
						this._variable_value_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.variables")]
	public partial class Variable : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _variable_id;
		
		private System.DateTime _variable_created;
		
		private System.DateTime _variable_modified;
		
		private string _variable_name;
		
		private string _variable_description;
		
		private int _variable_type_id;
		
		private System.Nullable<int> _variable_created_by_id;
		
		private System.Nullable<int> _variable_modified_by_id;
		
		private bool _variable_editable;
		
		private int _variable_ordering;
		
		private bool _variable_published;
		
		private System.Nullable<int> _language_id;
		
		private System.Nullable<int> _template_id;
		
		private EntitySet<VariableValue> _VariableValues;
		
		private EntityRef<Template> _Template;
		
		private EntityRef<VariableType> _VariableType;
		
		private EntityRef<User> _user;
		
		private EntityRef<User> _User1;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onvariable_idChanging(int value);
    partial void Onvariable_idChanged();
    partial void Onvariable_createdChanging(System.DateTime value);
    partial void Onvariable_createdChanged();
    partial void Onvariable_modifiedChanging(System.DateTime value);
    partial void Onvariable_modifiedChanged();
    partial void Onvariable_nameChanging(string value);
    partial void Onvariable_nameChanged();
    partial void Onvariable_descriptionChanging(string value);
    partial void Onvariable_descriptionChanged();
    partial void Onvariable_type_idChanging(int value);
    partial void Onvariable_type_idChanged();
    partial void Onvariable_created_by_idChanging(System.Nullable<int> value);
    partial void Onvariable_created_by_idChanged();
    partial void Onvariable_modified_by_idChanging(System.Nullable<int> value);
    partial void Onvariable_modified_by_idChanged();
    partial void Onvariable_editableChanging(bool value);
    partial void Onvariable_editableChanged();
    partial void Onvariable_orderingChanging(int value);
    partial void Onvariable_orderingChanged();
    partial void Onvariable_publishedChanging(bool value);
    partial void Onvariable_publishedChanged();
    partial void Onlanguage_idChanging(System.Nullable<int> value);
    partial void Onlanguage_idChanged();
    partial void Ontemplate_idChanging(System.Nullable<int> value);
    partial void Ontemplate_idChanged();
    #endregion
		
		public Variable()
		{
			this._VariableValues = new EntitySet<VariableValue>(new Action<VariableValue>(this.attach_VariableValues), new Action<VariableValue>(this.detach_VariableValues));
			this._Template = default(EntityRef<Template>);
			this._VariableType = default(EntityRef<VariableType>);
			this._user = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_variable_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int variable_id
		{
			get
			{
				return this._variable_id;
			}
			set
			{
				if ((this._variable_id != value))
				{
					this.Onvariable_idChanging(value);
					this.SendPropertyChanging();
					this._variable_id = value;
					this.SendPropertyChanged("variable_id");
					this.Onvariable_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_created", DbType="DateTime NOT NULL")]
		public System.DateTime variable_created
		{
			get
			{
				return this._variable_created;
			}
			set
			{
				if ((this._variable_created != value))
				{
					this.Onvariable_createdChanging(value);
					this.SendPropertyChanging();
					this._variable_created = value;
					this.SendPropertyChanged("variable_created");
					this.Onvariable_createdChanged();
				}
			}
		}
		
		[Column(Storage="_variable_modified", DbType="DateTime NOT NULL")]
		public System.DateTime variable_modified
		{
			get
			{
				return this._variable_modified;
			}
			set
			{
				if ((this._variable_modified != value))
				{
					this.Onvariable_modifiedChanging(value);
					this.SendPropertyChanging();
					this._variable_modified = value;
					this.SendPropertyChanged("variable_modified");
					this.Onvariable_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_variable_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string variable_name
		{
			get
			{
				return this._variable_name;
			}
			set
			{
				if ((this._variable_name != value))
				{
					this.Onvariable_nameChanging(value);
					this.SendPropertyChanging();
					this._variable_name = value;
					this.SendPropertyChanged("variable_name");
					this.Onvariable_nameChanged();
				}
			}
		}
		
		[Column(Storage="_variable_description", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string variable_description
		{
			get
			{
				return this._variable_description;
			}
			set
			{
				if ((this._variable_description != value))
				{
					this.Onvariable_descriptionChanging(value);
					this.SendPropertyChanging();
					this._variable_description = value;
					this.SendPropertyChanged("variable_description");
					this.Onvariable_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_variable_type_id", DbType="Int NOT NULL")]
		public int variable_type_id
		{
			get
			{
				return this._variable_type_id;
			}
			set
			{
				if ((this._variable_type_id != value))
				{
					if (this._VariableType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_type_idChanging(value);
					this.SendPropertyChanging();
					this._variable_type_id = value;
					this.SendPropertyChanged("variable_type_id");
					this.Onvariable_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_created_by_id", DbType="Int")]
		public System.Nullable<int> variable_created_by_id
		{
			get
			{
				return this._variable_created_by_id;
			}
			set
			{
				if ((this._variable_created_by_id != value))
				{
					if (this._user.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._variable_created_by_id = value;
					this.SendPropertyChanged("variable_created_by_id");
					this.Onvariable_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_modified_by_id", DbType="Int")]
		public System.Nullable<int> variable_modified_by_id
		{
			get
			{
				return this._variable_modified_by_id;
			}
			set
			{
				if ((this._variable_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvariable_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._variable_modified_by_id = value;
					this.SendPropertyChanged("variable_modified_by_id");
					this.Onvariable_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_variable_editable", DbType="Bit NOT NULL")]
		public bool variable_editable
		{
			get
			{
				return this._variable_editable;
			}
			set
			{
				if ((this._variable_editable != value))
				{
					this.Onvariable_editableChanging(value);
					this.SendPropertyChanging();
					this._variable_editable = value;
					this.SendPropertyChanged("variable_editable");
					this.Onvariable_editableChanged();
				}
			}
		}
		
		[Column(Storage="_variable_ordering", DbType="Int NOT NULL")]
		public int variable_ordering
		{
			get
			{
				return this._variable_ordering;
			}
			set
			{
				if ((this._variable_ordering != value))
				{
					this.Onvariable_orderingChanging(value);
					this.SendPropertyChanging();
					this._variable_ordering = value;
					this.SendPropertyChanged("variable_ordering");
					this.Onvariable_orderingChanged();
				}
			}
		}
		
		[Column(Storage="_variable_published", DbType="Bit NOT NULL")]
		public bool variable_published
		{
			get
			{
				return this._variable_published;
			}
			set
			{
				if ((this._variable_published != value))
				{
					this.Onvariable_publishedChanging(value);
					this.SendPropertyChanging();
					this._variable_published = value;
					this.SendPropertyChanged("variable_published");
					this.Onvariable_publishedChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int")]
		public System.Nullable<int> language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_template_id", DbType="Int")]
		public System.Nullable<int> template_id
		{
			get
			{
				return this._template_id;
			}
			set
			{
				if ((this._template_id != value))
				{
					if (this._Template.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontemplate_idChanging(value);
					this.SendPropertyChanging();
					this._template_id = value;
					this.SendPropertyChanged("template_id");
					this.Ontemplate_idChanged();
				}
			}
		}
		
		[Association(Name="Variable_VariableValue", Storage="_VariableValues", ThisKey="variable_id", OtherKey="variable_id")]
		public EntitySet<VariableValue> VariableValues
		{
			get
			{
				return this._VariableValues;
			}
			set
			{
				this._VariableValues.Assign(value);
			}
		}
		
		[Association(Name="Template_Variable", Storage="_Template", ThisKey="template_id", OtherKey="template_id", IsForeignKey=true)]
		public Template Template
		{
			get
			{
				return this._Template.Entity;
			}
			set
			{
				Template previousValue = this._Template.Entity;
				if (((previousValue != value) 
							|| (this._Template.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Template.Entity = null;
						previousValue.Variables.Remove(this);
					}
					this._Template.Entity = value;
					if ((value != null))
					{
						value.Variables.Add(this);
						this._template_id = value.template_id;
					}
					else
					{
						this._template_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Template");
				}
			}
		}
		
		[Association(Name="VariableType_Variable", Storage="_VariableType", ThisKey="variable_type_id", OtherKey="variable_type_id", IsForeignKey=true)]
		public VariableType VariableType
		{
			get
			{
				return this._VariableType.Entity;
			}
			set
			{
				VariableType previousValue = this._VariableType.Entity;
				if (((previousValue != value) 
							|| (this._VariableType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._VariableType.Entity = null;
						previousValue.Variables.Remove(this);
					}
					this._VariableType.Entity = value;
					if ((value != null))
					{
						value.Variables.Add(this);
						this._variable_type_id = value.variable_type_id;
					}
					else
					{
						this._variable_type_id = default(int);
					}
					this.SendPropertyChanged("VariableType");
				}
			}
		}
		
		[Association(Name="User_Variable", Storage="_user", ThisKey="variable_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user
		{
			get
			{
				return this._user.Entity;
			}
			set
			{
				User previousValue = this._user.Entity;
				if (((previousValue != value) 
							|| (this._user.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user.Entity = null;
						previousValue.Variables.Remove(this);
					}
					this._user.Entity = value;
					if ((value != null))
					{
						value.Variables.Add(this);
						this._variable_created_by_id = value.user_id;
					}
					else
					{
						this._variable_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user");
				}
			}
		}
		
		[Association(Name="User_Variable1", Storage="_User1", ThisKey="variable_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.Variables1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.Variables1.Add(this);
						this._variable_modified_by_id = value.user_id;
					}
					else
					{
						this._variable_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		[Association(Name="Language_Variable", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.Variables.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.Variables.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.Variable = this;
		}
		
		private void detach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.Variable = null;
		}
	}
	
	[Table(Name="dbo.filtron_engine_models")]
	public partial class FiltronEngineModel : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _engine_model_id;
		
		private System.DateTime _engine_model_created;
		
		private System.DateTime _engine_model_modified;
		
		private int _engine_id;
		
		private int _model_id;
		
		private EntityRef<FiltronEngine> _filtron_engine;
		
		private EntityRef<FiltronModel> _filtron_model;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onengine_model_idChanging(int value);
    partial void Onengine_model_idChanged();
    partial void Onengine_model_createdChanging(System.DateTime value);
    partial void Onengine_model_createdChanged();
    partial void Onengine_model_modifiedChanging(System.DateTime value);
    partial void Onengine_model_modifiedChanged();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onmodel_idChanging(int value);
    partial void Onmodel_idChanged();
    #endregion
		
		public FiltronEngineModel()
		{
			this._filtron_engine = default(EntityRef<FiltronEngine>);
			this._filtron_model = default(EntityRef<FiltronModel>);
			OnCreated();
		}
		
		[Column(Storage="_engine_model_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int engine_model_id
		{
			get
			{
				return this._engine_model_id;
			}
			set
			{
				if ((this._engine_model_id != value))
				{
					this.Onengine_model_idChanging(value);
					this.SendPropertyChanging();
					this._engine_model_id = value;
					this.SendPropertyChanged("engine_model_id");
					this.Onengine_model_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_model_created", DbType="DateTime NOT NULL")]
		public System.DateTime engine_model_created
		{
			get
			{
				return this._engine_model_created;
			}
			set
			{
				if ((this._engine_model_created != value))
				{
					this.Onengine_model_createdChanging(value);
					this.SendPropertyChanging();
					this._engine_model_created = value;
					this.SendPropertyChanged("engine_model_created");
					this.Onengine_model_createdChanged();
				}
			}
		}
		
		[Column(Storage="_engine_model_modified", DbType="DateTime NOT NULL")]
		public System.DateTime engine_model_modified
		{
			get
			{
				return this._engine_model_modified;
			}
			set
			{
				if ((this._engine_model_modified != value))
				{
					this.Onengine_model_modifiedChanging(value);
					this.SendPropertyChanging();
					this._engine_model_modified = value;
					this.SendPropertyChanged("engine_model_modified");
					this.Onengine_model_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_engine_id", DbType="Int NOT NULL")]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					if (this._filtron_engine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_id", DbType="Int NOT NULL")]
		public int model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					if (this._filtron_model.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Association(Name="FiltronEngine_FiltronEngineModel", Storage="_filtron_engine", ThisKey="engine_id", OtherKey="engine_id", IsForeignKey=true)]
		public FiltronEngine FiltronEngine
		{
			get
			{
				return this._filtron_engine.Entity;
			}
			set
			{
				FiltronEngine previousValue = this._filtron_engine.Entity;
				if (((previousValue != value) 
							|| (this._filtron_engine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_engine.Entity = null;
						previousValue.FiltronEngineModels.Remove(this);
					}
					this._filtron_engine.Entity = value;
					if ((value != null))
					{
						value.FiltronEngineModels.Add(this);
						this._engine_id = value.engine_id;
					}
					else
					{
						this._engine_id = default(int);
					}
					this.SendPropertyChanged("FiltronEngine");
				}
			}
		}
		
		[Association(Name="FiltronModel_FiltronEngineModel", Storage="_filtron_model", ThisKey="model_id", OtherKey="model_id", IsForeignKey=true)]
		public FiltronModel FiltronModel
		{
			get
			{
				return this._filtron_model.Entity;
			}
			set
			{
				FiltronModel previousValue = this._filtron_model.Entity;
				if (((previousValue != value) 
							|| (this._filtron_model.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_model.Entity = null;
						previousValue.FiltronEngineModels.Remove(this);
					}
					this._filtron_model.Entity = value;
					if ((value != null))
					{
						value.FiltronEngineModels.Add(this);
						this._model_id = value.model_id;
					}
					else
					{
						this._model_id = default(int);
					}
					this.SendPropertyChanged("FiltronModel");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.filtron_engines")]
	public partial class FiltronEngine : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _engine_id;
		
		private System.DateTime _engine_created;
		
		private System.DateTime _engine_modified;
		
		private string _engine_name;
		
		private string _engine_description;
		
		private string _engine_cubic_capacity;
		
		private string _engine_code;
		
		private string _engine_horse_power;
		
		private System.Nullable<int> _engine_year_from;
		
		private System.Nullable<int> _engine_year_to;
		
		private int _vehicle_id;
		
		private EntitySet<FiltronEngineModel> _filtron_engine_models;
		
		private EntitySet<FiltronFilterEngine> _FiltronFilterEngines;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onengine_createdChanging(System.DateTime value);
    partial void Onengine_createdChanged();
    partial void Onengine_modifiedChanging(System.DateTime value);
    partial void Onengine_modifiedChanged();
    partial void Onengine_nameChanging(string value);
    partial void Onengine_nameChanged();
    partial void Onengine_descriptionChanging(string value);
    partial void Onengine_descriptionChanged();
    partial void Onengine_cubic_capacityChanging(string value);
    partial void Onengine_cubic_capacityChanged();
    partial void Onengine_codeChanging(string value);
    partial void Onengine_codeChanged();
    partial void Onengine_horse_powerChanging(string value);
    partial void Onengine_horse_powerChanged();
    partial void Onengine_year_fromChanging(System.Nullable<int> value);
    partial void Onengine_year_fromChanged();
    partial void Onengine_year_toChanging(System.Nullable<int> value);
    partial void Onengine_year_toChanged();
    partial void Onvehicle_idChanging(int value);
    partial void Onvehicle_idChanged();
    #endregion
		
		public FiltronEngine()
		{
			this._filtron_engine_models = new EntitySet<FiltronEngineModel>(new Action<FiltronEngineModel>(this.attach_filtron_engine_models), new Action<FiltronEngineModel>(this.detach_filtron_engine_models));
			this._FiltronFilterEngines = new EntitySet<FiltronFilterEngine>(new Action<FiltronFilterEngine>(this.attach_FiltronFilterEngines), new Action<FiltronFilterEngine>(this.detach_FiltronFilterEngines));
			OnCreated();
		}
		
		[Column(Storage="_engine_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_created", DbType="DateTime NOT NULL")]
		public System.DateTime engine_created
		{
			get
			{
				return this._engine_created;
			}
			set
			{
				if ((this._engine_created != value))
				{
					this.Onengine_createdChanging(value);
					this.SendPropertyChanging();
					this._engine_created = value;
					this.SendPropertyChanged("engine_created");
					this.Onengine_createdChanged();
				}
			}
		}
		
		[Column(Storage="_engine_modified", DbType="DateTime NOT NULL")]
		public System.DateTime engine_modified
		{
			get
			{
				return this._engine_modified;
			}
			set
			{
				if ((this._engine_modified != value))
				{
					this.Onengine_modifiedChanging(value);
					this.SendPropertyChanging();
					this._engine_modified = value;
					this.SendPropertyChanged("engine_modified");
					this.Onengine_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_engine_name", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string engine_name
		{
			get
			{
				return this._engine_name;
			}
			set
			{
				if ((this._engine_name != value))
				{
					this.Onengine_nameChanging(value);
					this.SendPropertyChanging();
					this._engine_name = value;
					this.SendPropertyChanged("engine_name");
					this.Onengine_nameChanged();
				}
			}
		}
		
		[Column(Storage="_engine_description", DbType="NVarChar(255)")]
		public string engine_description
		{
			get
			{
				return this._engine_description;
			}
			set
			{
				if ((this._engine_description != value))
				{
					this.Onengine_descriptionChanging(value);
					this.SendPropertyChanging();
					this._engine_description = value;
					this.SendPropertyChanged("engine_description");
					this.Onengine_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_engine_cubic_capacity", DbType="NVarChar(255)")]
		public string engine_cubic_capacity
		{
			get
			{
				return this._engine_cubic_capacity;
			}
			set
			{
				if ((this._engine_cubic_capacity != value))
				{
					this.Onengine_cubic_capacityChanging(value);
					this.SendPropertyChanging();
					this._engine_cubic_capacity = value;
					this.SendPropertyChanged("engine_cubic_capacity");
					this.Onengine_cubic_capacityChanged();
				}
			}
		}
		
		[Column(Storage="_engine_code", DbType="NVarChar(255)")]
		public string engine_code
		{
			get
			{
				return this._engine_code;
			}
			set
			{
				if ((this._engine_code != value))
				{
					this.Onengine_codeChanging(value);
					this.SendPropertyChanging();
					this._engine_code = value;
					this.SendPropertyChanged("engine_code");
					this.Onengine_codeChanged();
				}
			}
		}
		
		[Column(Storage="_engine_horse_power", DbType="NVarChar(255)")]
		public string engine_horse_power
		{
			get
			{
				return this._engine_horse_power;
			}
			set
			{
				if ((this._engine_horse_power != value))
				{
					this.Onengine_horse_powerChanging(value);
					this.SendPropertyChanging();
					this._engine_horse_power = value;
					this.SendPropertyChanged("engine_horse_power");
					this.Onengine_horse_powerChanged();
				}
			}
		}
		
		[Column(Storage="_engine_year_from", DbType="Int")]
		public System.Nullable<int> engine_year_from
		{
			get
			{
				return this._engine_year_from;
			}
			set
			{
				if ((this._engine_year_from != value))
				{
					this.Onengine_year_fromChanging(value);
					this.SendPropertyChanging();
					this._engine_year_from = value;
					this.SendPropertyChanged("engine_year_from");
					this.Onengine_year_fromChanged();
				}
			}
		}
		
		[Column(Storage="_engine_year_to", DbType="Int")]
		public System.Nullable<int> engine_year_to
		{
			get
			{
				return this._engine_year_to;
			}
			set
			{
				if ((this._engine_year_to != value))
				{
					this.Onengine_year_toChanging(value);
					this.SendPropertyChanging();
					this._engine_year_to = value;
					this.SendPropertyChanged("engine_year_to");
					this.Onengine_year_toChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_id")]
		public int vehicle_id
		{
			get
			{
				return this._vehicle_id;
			}
			set
			{
				if ((this._vehicle_id != value))
				{
					this.Onvehicle_idChanging(value);
					this.SendPropertyChanging();
					this._vehicle_id = value;
					this.SendPropertyChanged("vehicle_id");
					this.Onvehicle_idChanged();
				}
			}
		}
		
		[Association(Name="FiltronEngine_FiltronEngineModel", Storage="_filtron_engine_models", ThisKey="engine_id", OtherKey="engine_id")]
		public EntitySet<FiltronEngineModel> FiltronEngineModels
		{
			get
			{
				return this._filtron_engine_models;
			}
			set
			{
				this._filtron_engine_models.Assign(value);
			}
		}
		
		[Association(Name="FiltronEngine_FiltronFilterEngine", Storage="_FiltronFilterEngines", ThisKey="engine_id", OtherKey="engine_id")]
		public EntitySet<FiltronFilterEngine> FiltronFilterEngines
		{
			get
			{
				return this._FiltronFilterEngines;
			}
			set
			{
				this._FiltronFilterEngines.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_engine_models(FiltronEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronEngine = this;
		}
		
		private void detach_filtron_engine_models(FiltronEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronEngine = null;
		}
		
		private void attach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronEngine = this;
		}
		
		private void detach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronEngine = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_medias")]
	public partial class FiltronFilterMedia : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _media_id;
		
		private System.DateTime _media_created;
		
		private System.DateTime _media_modified;
		
		private string _media_name;
		
		private string _media_abbr;
		
		private EntitySet<FiltronFilter> _FiltronFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmedia_idChanging(int value);
    partial void Onmedia_idChanged();
    partial void Onmedia_createdChanging(System.DateTime value);
    partial void Onmedia_createdChanged();
    partial void Onmedia_modifiedChanging(System.DateTime value);
    partial void Onmedia_modifiedChanged();
    partial void Onmedia_nameChanging(string value);
    partial void Onmedia_nameChanged();
    partial void Onmedia_abbrChanging(string value);
    partial void Onmedia_abbrChanged();
    #endregion
		
		public FiltronFilterMedia()
		{
			this._FiltronFilters = new EntitySet<FiltronFilter>(new Action<FiltronFilter>(this.attach_FiltronFilters), new Action<FiltronFilter>(this.detach_FiltronFilters));
			OnCreated();
		}
		
		[Column(Storage="_media_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int media_id
		{
			get
			{
				return this._media_id;
			}
			set
			{
				if ((this._media_id != value))
				{
					this.Onmedia_idChanging(value);
					this.SendPropertyChanging();
					this._media_id = value;
					this.SendPropertyChanged("media_id");
					this.Onmedia_idChanged();
				}
			}
		}
		
		[Column(Storage="_media_created", DbType="DateTime NOT NULL")]
		public System.DateTime media_created
		{
			get
			{
				return this._media_created;
			}
			set
			{
				if ((this._media_created != value))
				{
					this.Onmedia_createdChanging(value);
					this.SendPropertyChanging();
					this._media_created = value;
					this.SendPropertyChanged("media_created");
					this.Onmedia_createdChanged();
				}
			}
		}
		
		[Column(Storage="_media_modified", DbType="DateTime NOT NULL")]
		public System.DateTime media_modified
		{
			get
			{
				return this._media_modified;
			}
			set
			{
				if ((this._media_modified != value))
				{
					this.Onmedia_modifiedChanging(value);
					this.SendPropertyChanging();
					this._media_modified = value;
					this.SendPropertyChanged("media_modified");
					this.Onmedia_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_media_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string media_name
		{
			get
			{
				return this._media_name;
			}
			set
			{
				if ((this._media_name != value))
				{
					this.Onmedia_nameChanging(value);
					this.SendPropertyChanging();
					this._media_name = value;
					this.SendPropertyChanged("media_name");
					this.Onmedia_nameChanged();
				}
			}
		}
		
		[Column(Storage="_media_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string media_abbr
		{
			get
			{
				return this._media_abbr;
			}
			set
			{
				if ((this._media_abbr != value))
				{
					this.Onmedia_abbrChanging(value);
					this.SendPropertyChanging();
					this._media_abbr = value;
					this.SendPropertyChanged("media_abbr");
					this.Onmedia_abbrChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterMedia_FiltronFilter", Storage="_FiltronFilters", ThisKey="media_id", OtherKey="filter_media_id")]
		public EntitySet<FiltronFilter> FiltronFilters
		{
			get
			{
				return this._FiltronFilters;
			}
			set
			{
				this._FiltronFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterMedia = this;
		}
		
		private void detach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterMedia = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_shapes")]
	public partial class FiltronFilterShape : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _shape_id;
		
		private System.DateTime _shape_created;
		
		private System.DateTime _shape_modified;
		
		private string _shape_name;
		
		private string _shape_abbr;
		
		private EntitySet<FiltronFilterTypeShape> _filtron_filter_type_shapes;
		
		private EntitySet<FiltronFilter> _FiltronFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onshape_idChanging(int value);
    partial void Onshape_idChanged();
    partial void Onshape_createdChanging(System.DateTime value);
    partial void Onshape_createdChanged();
    partial void Onshape_modifiedChanging(System.DateTime value);
    partial void Onshape_modifiedChanged();
    partial void Onshape_nameChanging(string value);
    partial void Onshape_nameChanged();
    partial void Onshape_abbrChanging(string value);
    partial void Onshape_abbrChanged();
    #endregion
		
		public FiltronFilterShape()
		{
			this._filtron_filter_type_shapes = new EntitySet<FiltronFilterTypeShape>(new Action<FiltronFilterTypeShape>(this.attach_filtron_filter_type_shapes), new Action<FiltronFilterTypeShape>(this.detach_filtron_filter_type_shapes));
			this._FiltronFilters = new EntitySet<FiltronFilter>(new Action<FiltronFilter>(this.attach_FiltronFilters), new Action<FiltronFilter>(this.detach_FiltronFilters));
			OnCreated();
		}
		
		[Column(Storage="_shape_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int shape_id
		{
			get
			{
				return this._shape_id;
			}
			set
			{
				if ((this._shape_id != value))
				{
					this.Onshape_idChanging(value);
					this.SendPropertyChanging();
					this._shape_id = value;
					this.SendPropertyChanged("shape_id");
					this.Onshape_idChanged();
				}
			}
		}
		
		[Column(Storage="_shape_created", DbType="DateTime NOT NULL")]
		public System.DateTime shape_created
		{
			get
			{
				return this._shape_created;
			}
			set
			{
				if ((this._shape_created != value))
				{
					this.Onshape_createdChanging(value);
					this.SendPropertyChanging();
					this._shape_created = value;
					this.SendPropertyChanged("shape_created");
					this.Onshape_createdChanged();
				}
			}
		}
		
		[Column(Storage="_shape_modified", DbType="DateTime NOT NULL")]
		public System.DateTime shape_modified
		{
			get
			{
				return this._shape_modified;
			}
			set
			{
				if ((this._shape_modified != value))
				{
					this.Onshape_modifiedChanging(value);
					this.SendPropertyChanging();
					this._shape_modified = value;
					this.SendPropertyChanged("shape_modified");
					this.Onshape_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_shape_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string shape_name
		{
			get
			{
				return this._shape_name;
			}
			set
			{
				if ((this._shape_name != value))
				{
					this.Onshape_nameChanging(value);
					this.SendPropertyChanging();
					this._shape_name = value;
					this.SendPropertyChanged("shape_name");
					this.Onshape_nameChanged();
				}
			}
		}
		
		[Column(Storage="_shape_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string shape_abbr
		{
			get
			{
				return this._shape_abbr;
			}
			set
			{
				if ((this._shape_abbr != value))
				{
					this.Onshape_abbrChanging(value);
					this.SendPropertyChanging();
					this._shape_abbr = value;
					this.SendPropertyChanged("shape_abbr");
					this.Onshape_abbrChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterShape_FiltronFilterTypeShape", Storage="_filtron_filter_type_shapes", ThisKey="shape_id", OtherKey="shape_id")]
		public EntitySet<FiltronFilterTypeShape> FiltronFilterTypeShapes
		{
			get
			{
				return this._filtron_filter_type_shapes;
			}
			set
			{
				this._filtron_filter_type_shapes.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilterShape_FiltronFilter", Storage="_FiltronFilters", ThisKey="shape_id", OtherKey="filter_shape_id")]
		public EntitySet<FiltronFilter> FiltronFilters
		{
			get
			{
				return this._FiltronFilters;
			}
			set
			{
				this._FiltronFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_filter_type_shapes(FiltronFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterShape = this;
		}
		
		private void detach_filtron_filter_type_shapes(FiltronFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterShape = null;
		}
		
		private void attach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterShape = this;
		}
		
		private void detach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterShape = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_styles")]
	public partial class FiltronFilterStyle : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _style_id;
		
		private System.DateTime _style_created;
		
		private System.DateTime _style_modified;
		
		private string _style_name;
		
		private string _style_abbr;
		
		private EntitySet<FiltronFilter> _FiltronFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onstyle_idChanging(int value);
    partial void Onstyle_idChanged();
    partial void Onstyle_createdChanging(System.DateTime value);
    partial void Onstyle_createdChanged();
    partial void Onstyle_modifiedChanging(System.DateTime value);
    partial void Onstyle_modifiedChanged();
    partial void Onstyle_nameChanging(string value);
    partial void Onstyle_nameChanged();
    partial void Onstyle_abbrChanging(string value);
    partial void Onstyle_abbrChanged();
    #endregion
		
		public FiltronFilterStyle()
		{
			this._FiltronFilters = new EntitySet<FiltronFilter>(new Action<FiltronFilter>(this.attach_FiltronFilters), new Action<FiltronFilter>(this.detach_FiltronFilters));
			OnCreated();
		}
		
		[Column(Storage="_style_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int style_id
		{
			get
			{
				return this._style_id;
			}
			set
			{
				if ((this._style_id != value))
				{
					this.Onstyle_idChanging(value);
					this.SendPropertyChanging();
					this._style_id = value;
					this.SendPropertyChanged("style_id");
					this.Onstyle_idChanged();
				}
			}
		}
		
		[Column(Storage="_style_created", DbType="DateTime NOT NULL")]
		public System.DateTime style_created
		{
			get
			{
				return this._style_created;
			}
			set
			{
				if ((this._style_created != value))
				{
					this.Onstyle_createdChanging(value);
					this.SendPropertyChanging();
					this._style_created = value;
					this.SendPropertyChanged("style_created");
					this.Onstyle_createdChanged();
				}
			}
		}
		
		[Column(Storage="_style_modified", DbType="DateTime NOT NULL")]
		public System.DateTime style_modified
		{
			get
			{
				return this._style_modified;
			}
			set
			{
				if ((this._style_modified != value))
				{
					this.Onstyle_modifiedChanging(value);
					this.SendPropertyChanging();
					this._style_modified = value;
					this.SendPropertyChanged("style_modified");
					this.Onstyle_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_style_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string style_name
		{
			get
			{
				return this._style_name;
			}
			set
			{
				if ((this._style_name != value))
				{
					this.Onstyle_nameChanging(value);
					this.SendPropertyChanging();
					this._style_name = value;
					this.SendPropertyChanged("style_name");
					this.Onstyle_nameChanged();
				}
			}
		}
		
		[Column(Storage="_style_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string style_abbr
		{
			get
			{
				return this._style_abbr;
			}
			set
			{
				if ((this._style_abbr != value))
				{
					this.Onstyle_abbrChanging(value);
					this.SendPropertyChanging();
					this._style_abbr = value;
					this.SendPropertyChanged("style_abbr");
					this.Onstyle_abbrChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterStyle_FiltronFilter", Storage="_FiltronFilters", ThisKey="style_id", OtherKey="filter_style_id")]
		public EntitySet<FiltronFilter> FiltronFilters
		{
			get
			{
				return this._FiltronFilters;
			}
			set
			{
				this._FiltronFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterStyle = this;
		}
		
		private void detach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterStyle = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_type_shapes")]
	public partial class FiltronFilterTypeShape : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _type_shape_id;
		
		private System.DateTime _type_shape_created;
		
		private System.DateTime _type_shape_modified;
		
		private int _type_id;
		
		private int _shape_id;
		
		private System.Nullable<bool> _dim_a_available;
		
		private System.Nullable<bool> _dim_b_available;
		
		private System.Nullable<bool> _dim_c_available;
		
		private System.Nullable<bool> _dim_d_available;
		
		private System.Nullable<bool> _dim_e_available;
		
		private System.Nullable<bool> _dim_f_available;
		
		private System.Nullable<bool> _dim_g_available;
		
		private System.Nullable<bool> _dim_h_available;
		
		private string _default_figure_link;
		
		private System.Nullable<int> _dict_id;
		
		private System.Nullable<int> _dict_kind;
		
		private EntityRef<FiltronFilterShape> _filtron_filter_shape;
		
		private EntityRef<FiltronFilterType> _filtron_filter_type;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontype_shape_idChanging(int value);
    partial void Ontype_shape_idChanged();
    partial void Ontype_shape_createdChanging(System.DateTime value);
    partial void Ontype_shape_createdChanged();
    partial void Ontype_shape_modifiedChanging(System.DateTime value);
    partial void Ontype_shape_modifiedChanged();
    partial void Ontype_idChanging(int value);
    partial void Ontype_idChanged();
    partial void Onshape_idChanging(int value);
    partial void Onshape_idChanged();
    partial void Ondim_a_availableChanging(System.Nullable<bool> value);
    partial void Ondim_a_availableChanged();
    partial void Ondim_b_availableChanging(System.Nullable<bool> value);
    partial void Ondim_b_availableChanged();
    partial void Ondim_c_availableChanging(System.Nullable<bool> value);
    partial void Ondim_c_availableChanged();
    partial void Ondim_d_availableChanging(System.Nullable<bool> value);
    partial void Ondim_d_availableChanged();
    partial void Ondim_e_availableChanging(System.Nullable<bool> value);
    partial void Ondim_e_availableChanged();
    partial void Ondim_f_availableChanging(System.Nullable<bool> value);
    partial void Ondim_f_availableChanged();
    partial void Ondim_g_availableChanging(System.Nullable<bool> value);
    partial void Ondim_g_availableChanged();
    partial void Ondim_h_availableChanging(System.Nullable<bool> value);
    partial void Ondim_h_availableChanged();
    partial void Ondefault_figure_linkChanging(string value);
    partial void Ondefault_figure_linkChanged();
    partial void Ondict_idChanging(System.Nullable<int> value);
    partial void Ondict_idChanged();
    partial void Ondict_kindChanging(System.Nullable<int> value);
    partial void Ondict_kindChanged();
    #endregion
		
		public FiltronFilterTypeShape()
		{
			this._filtron_filter_shape = default(EntityRef<FiltronFilterShape>);
			this._filtron_filter_type = default(EntityRef<FiltronFilterType>);
			OnCreated();
		}
		
		[Column(Storage="_type_shape_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int type_shape_id
		{
			get
			{
				return this._type_shape_id;
			}
			set
			{
				if ((this._type_shape_id != value))
				{
					this.Ontype_shape_idChanging(value);
					this.SendPropertyChanging();
					this._type_shape_id = value;
					this.SendPropertyChanged("type_shape_id");
					this.Ontype_shape_idChanged();
				}
			}
		}
		
		[Column(Storage="_type_shape_created", DbType="DateTime NOT NULL")]
		public System.DateTime type_shape_created
		{
			get
			{
				return this._type_shape_created;
			}
			set
			{
				if ((this._type_shape_created != value))
				{
					this.Ontype_shape_createdChanging(value);
					this.SendPropertyChanging();
					this._type_shape_created = value;
					this.SendPropertyChanged("type_shape_created");
					this.Ontype_shape_createdChanged();
				}
			}
		}
		
		[Column(Storage="_type_shape_modified", DbType="DateTime NOT NULL")]
		public System.DateTime type_shape_modified
		{
			get
			{
				return this._type_shape_modified;
			}
			set
			{
				if ((this._type_shape_modified != value))
				{
					this.Ontype_shape_modifiedChanging(value);
					this.SendPropertyChanging();
					this._type_shape_modified = value;
					this.SendPropertyChanged("type_shape_modified");
					this.Ontype_shape_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_type_id", DbType="Int NOT NULL")]
		public int type_id
		{
			get
			{
				return this._type_id;
			}
			set
			{
				if ((this._type_id != value))
				{
					if (this._filtron_filter_type.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontype_idChanging(value);
					this.SendPropertyChanging();
					this._type_id = value;
					this.SendPropertyChanged("type_id");
					this.Ontype_idChanged();
				}
			}
		}
		
		[Column(Storage="_shape_id", DbType="Int NOT NULL")]
		public int shape_id
		{
			get
			{
				return this._shape_id;
			}
			set
			{
				if ((this._shape_id != value))
				{
					if (this._filtron_filter_shape.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onshape_idChanging(value);
					this.SendPropertyChanging();
					this._shape_id = value;
					this.SendPropertyChanged("shape_id");
					this.Onshape_idChanged();
				}
			}
		}
		
		[Column(Storage="_dim_a_available")]
		public System.Nullable<bool> dim_a_available
		{
			get
			{
				return this._dim_a_available;
			}
			set
			{
				if ((this._dim_a_available != value))
				{
					this.Ondim_a_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_a_available = value;
					this.SendPropertyChanged("dim_a_available");
					this.Ondim_a_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_b_available")]
		public System.Nullable<bool> dim_b_available
		{
			get
			{
				return this._dim_b_available;
			}
			set
			{
				if ((this._dim_b_available != value))
				{
					this.Ondim_b_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_b_available = value;
					this.SendPropertyChanged("dim_b_available");
					this.Ondim_b_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_c_available")]
		public System.Nullable<bool> dim_c_available
		{
			get
			{
				return this._dim_c_available;
			}
			set
			{
				if ((this._dim_c_available != value))
				{
					this.Ondim_c_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_c_available = value;
					this.SendPropertyChanged("dim_c_available");
					this.Ondim_c_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_d_available")]
		public System.Nullable<bool> dim_d_available
		{
			get
			{
				return this._dim_d_available;
			}
			set
			{
				if ((this._dim_d_available != value))
				{
					this.Ondim_d_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_d_available = value;
					this.SendPropertyChanged("dim_d_available");
					this.Ondim_d_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_e_available")]
		public System.Nullable<bool> dim_e_available
		{
			get
			{
				return this._dim_e_available;
			}
			set
			{
				if ((this._dim_e_available != value))
				{
					this.Ondim_e_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_e_available = value;
					this.SendPropertyChanged("dim_e_available");
					this.Ondim_e_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_f_available")]
		public System.Nullable<bool> dim_f_available
		{
			get
			{
				return this._dim_f_available;
			}
			set
			{
				if ((this._dim_f_available != value))
				{
					this.Ondim_f_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_f_available = value;
					this.SendPropertyChanged("dim_f_available");
					this.Ondim_f_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_g_available")]
		public System.Nullable<bool> dim_g_available
		{
			get
			{
				return this._dim_g_available;
			}
			set
			{
				if ((this._dim_g_available != value))
				{
					this.Ondim_g_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_g_available = value;
					this.SendPropertyChanged("dim_g_available");
					this.Ondim_g_availableChanged();
				}
			}
		}
		
		[Column(Storage="_dim_h_available")]
		public System.Nullable<bool> dim_h_available
		{
			get
			{
				return this._dim_h_available;
			}
			set
			{
				if ((this._dim_h_available != value))
				{
					this.Ondim_h_availableChanging(value);
					this.SendPropertyChanging();
					this._dim_h_available = value;
					this.SendPropertyChanged("dim_h_available");
					this.Ondim_h_availableChanged();
				}
			}
		}
		
		[Column(Storage="_default_figure_link")]
		public string default_figure_link
		{
			get
			{
				return this._default_figure_link;
			}
			set
			{
				if ((this._default_figure_link != value))
				{
					this.Ondefault_figure_linkChanging(value);
					this.SendPropertyChanging();
					this._default_figure_link = value;
					this.SendPropertyChanged("default_figure_link");
					this.Ondefault_figure_linkChanged();
				}
			}
		}
		
		[Column(Storage="_dict_id")]
		public System.Nullable<int> dict_id
		{
			get
			{
				return this._dict_id;
			}
			set
			{
				if ((this._dict_id != value))
				{
					this.Ondict_idChanging(value);
					this.SendPropertyChanging();
					this._dict_id = value;
					this.SendPropertyChanged("dict_id");
					this.Ondict_idChanged();
				}
			}
		}
		
		[Column(Storage="_dict_kind")]
		public System.Nullable<int> dict_kind
		{
			get
			{
				return this._dict_kind;
			}
			set
			{
				if ((this._dict_kind != value))
				{
					this.Ondict_kindChanging(value);
					this.SendPropertyChanging();
					this._dict_kind = value;
					this.SendPropertyChanged("dict_kind");
					this.Ondict_kindChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterShape_FiltronFilterTypeShape", Storage="_filtron_filter_shape", ThisKey="shape_id", OtherKey="shape_id", IsForeignKey=true)]
		public FiltronFilterShape FiltronFilterShape
		{
			get
			{
				return this._filtron_filter_shape.Entity;
			}
			set
			{
				FiltronFilterShape previousValue = this._filtron_filter_shape.Entity;
				if (((previousValue != value) 
							|| (this._filtron_filter_shape.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_filter_shape.Entity = null;
						previousValue.FiltronFilterTypeShapes.Remove(this);
					}
					this._filtron_filter_shape.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterTypeShapes.Add(this);
						this._shape_id = value.shape_id;
					}
					else
					{
						this._shape_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilterShape");
				}
			}
		}
		
		[Association(Name="FiltronFilterType_FiltronFilterTypeShape", Storage="_filtron_filter_type", ThisKey="type_id", OtherKey="type_id", IsForeignKey=true)]
		public FiltronFilterType FiltronFilterType
		{
			get
			{
				return this._filtron_filter_type.Entity;
			}
			set
			{
				FiltronFilterType previousValue = this._filtron_filter_type.Entity;
				if (((previousValue != value) 
							|| (this._filtron_filter_type.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_filter_type.Entity = null;
						previousValue.FiltronFilterTypeShapes.Remove(this);
					}
					this._filtron_filter_type.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterTypeShapes.Add(this);
						this._type_id = value.type_id;
					}
					else
					{
						this._type_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilterType");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.filtron_filter_types")]
	public partial class FiltronFilterType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _type_id;
		
		private System.DateTime _type_created;
		
		private System.DateTime _type_modified;
		
		private string _type_name;
		
		private string _type_abbr;
		
		private EntitySet<FiltronFilterTypeShape> _filtron_filter_type_shapes;
		
		private EntitySet<FiltronFilter> _FiltronFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontype_idChanging(int value);
    partial void Ontype_idChanged();
    partial void Ontype_createdChanging(System.DateTime value);
    partial void Ontype_createdChanged();
    partial void Ontype_modifiedChanging(System.DateTime value);
    partial void Ontype_modifiedChanged();
    partial void Ontype_nameChanging(string value);
    partial void Ontype_nameChanged();
    partial void Ontype_abbrChanging(string value);
    partial void Ontype_abbrChanged();
    #endregion
		
		public FiltronFilterType()
		{
			this._filtron_filter_type_shapes = new EntitySet<FiltronFilterTypeShape>(new Action<FiltronFilterTypeShape>(this.attach_filtron_filter_type_shapes), new Action<FiltronFilterTypeShape>(this.detach_filtron_filter_type_shapes));
			this._FiltronFilters = new EntitySet<FiltronFilter>(new Action<FiltronFilter>(this.attach_FiltronFilters), new Action<FiltronFilter>(this.detach_FiltronFilters));
			OnCreated();
		}
		
		[Column(Storage="_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int type_id
		{
			get
			{
				return this._type_id;
			}
			set
			{
				if ((this._type_id != value))
				{
					this.Ontype_idChanging(value);
					this.SendPropertyChanging();
					this._type_id = value;
					this.SendPropertyChanged("type_id");
					this.Ontype_idChanged();
				}
			}
		}
		
		[Column(Storage="_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime type_created
		{
			get
			{
				return this._type_created;
			}
			set
			{
				if ((this._type_created != value))
				{
					this.Ontype_createdChanging(value);
					this.SendPropertyChanging();
					this._type_created = value;
					this.SendPropertyChanged("type_created");
					this.Ontype_createdChanged();
				}
			}
		}
		
		[Column(Storage="_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime type_modified
		{
			get
			{
				return this._type_modified;
			}
			set
			{
				if ((this._type_modified != value))
				{
					this.Ontype_modifiedChanging(value);
					this.SendPropertyChanging();
					this._type_modified = value;
					this.SendPropertyChanged("type_modified");
					this.Ontype_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_type_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string type_name
		{
			get
			{
				return this._type_name;
			}
			set
			{
				if ((this._type_name != value))
				{
					this.Ontype_nameChanging(value);
					this.SendPropertyChanging();
					this._type_name = value;
					this.SendPropertyChanged("type_name");
					this.Ontype_nameChanged();
				}
			}
		}
		
		[Column(Storage="_type_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string type_abbr
		{
			get
			{
				return this._type_abbr;
			}
			set
			{
				if ((this._type_abbr != value))
				{
					this.Ontype_abbrChanging(value);
					this.SendPropertyChanging();
					this._type_abbr = value;
					this.SendPropertyChanged("type_abbr");
					this.Ontype_abbrChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterType_FiltronFilterTypeShape", Storage="_filtron_filter_type_shapes", ThisKey="type_id", OtherKey="type_id")]
		public EntitySet<FiltronFilterTypeShape> FiltronFilterTypeShapes
		{
			get
			{
				return this._filtron_filter_type_shapes;
			}
			set
			{
				this._filtron_filter_type_shapes.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilterType_FiltronFilter", Storage="_FiltronFilters", ThisKey="type_id", OtherKey="filter_type_id")]
		public EntitySet<FiltronFilter> FiltronFilters
		{
			get
			{
				return this._FiltronFilters;
			}
			set
			{
				this._FiltronFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_filter_type_shapes(FiltronFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterType = this;
		}
		
		private void detach_filtron_filter_type_shapes(FiltronFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterType = null;
		}
		
		private void attach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterType = this;
		}
		
		private void detach_FiltronFilters(FiltronFilter entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterType = null;
		}
	}
	
	[Table(Name="dbo.filtron_interchange_manufacturers")]
	public partial class FiltronInterchangeManufacturer : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _manufacturer_id;
		
		private System.DateTime _manufacturer_created;
		
		private System.DateTime _manufacturer_modified;
		
		private string _manufacturer_name;
		
		private string _manufacturer_description;
		
		private EntitySet<FiltronInterchange> _FiltronInterchanges;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmanufacturer_idChanging(int value);
    partial void Onmanufacturer_idChanged();
    partial void Onmanufacturer_createdChanging(System.DateTime value);
    partial void Onmanufacturer_createdChanged();
    partial void Onmanufacturer_modifiedChanging(System.DateTime value);
    partial void Onmanufacturer_modifiedChanged();
    partial void Onmanufacturer_nameChanging(string value);
    partial void Onmanufacturer_nameChanged();
    partial void Onmanufacturer_descriptionChanging(string value);
    partial void Onmanufacturer_descriptionChanged();
    #endregion
		
		public FiltronInterchangeManufacturer()
		{
			this._FiltronInterchanges = new EntitySet<FiltronInterchange>(new Action<FiltronInterchange>(this.attach_FiltronInterchanges), new Action<FiltronInterchange>(this.detach_FiltronInterchanges));
			OnCreated();
		}
		
		[Column(Storage="_manufacturer_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int manufacturer_id
		{
			get
			{
				return this._manufacturer_id;
			}
			set
			{
				if ((this._manufacturer_id != value))
				{
					this.Onmanufacturer_idChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_id = value;
					this.SendPropertyChanged("manufacturer_id");
					this.Onmanufacturer_idChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_created", DbType="DateTime NOT NULL")]
		public System.DateTime manufacturer_created
		{
			get
			{
				return this._manufacturer_created;
			}
			set
			{
				if ((this._manufacturer_created != value))
				{
					this.Onmanufacturer_createdChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_created = value;
					this.SendPropertyChanged("manufacturer_created");
					this.Onmanufacturer_createdChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_modified", DbType="DateTime NOT NULL")]
		public System.DateTime manufacturer_modified
		{
			get
			{
				return this._manufacturer_modified;
			}
			set
			{
				if ((this._manufacturer_modified != value))
				{
					this.Onmanufacturer_modifiedChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_modified = value;
					this.SendPropertyChanged("manufacturer_modified");
					this.Onmanufacturer_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string manufacturer_name
		{
			get
			{
				return this._manufacturer_name;
			}
			set
			{
				if ((this._manufacturer_name != value))
				{
					this.Onmanufacturer_nameChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_name = value;
					this.SendPropertyChanged("manufacturer_name");
					this.Onmanufacturer_nameChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_description", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string manufacturer_description
		{
			get
			{
				return this._manufacturer_description;
			}
			set
			{
				if ((this._manufacturer_description != value))
				{
					this.Onmanufacturer_descriptionChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_description = value;
					this.SendPropertyChanged("manufacturer_description");
					this.Onmanufacturer_descriptionChanged();
				}
			}
		}
		
		[Association(Name="FiltronInterchangeManufacturer_filtron_interchange", Storage="_FiltronInterchanges", ThisKey="manufacturer_id", OtherKey="manufacturer_id")]
		public EntitySet<FiltronInterchange> FiltronInterchanges
		{
			get
			{
				return this._FiltronInterchanges;
			}
			set
			{
				this._FiltronInterchanges.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_FiltronInterchanges(FiltronInterchange entity)
		{
			this.SendPropertyChanging();
			entity.FiltronInterchangeManufacturer = this;
		}
		
		private void detach_FiltronInterchanges(FiltronInterchange entity)
		{
			this.SendPropertyChanging();
			entity.FiltronInterchangeManufacturer = null;
		}
	}
	
	[Table(Name="dbo.filtron_makes")]
	public partial class FiltronMake : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _make_id;
		
		private System.DateTime _make_created;
		
		private System.DateTime _make_modified;
		
		private string _make_name;
		
		private string _make_description;
		
		private int _vehicle_id;
		
		private EntitySet<FiltronModel> _filtron_models;
		
		private EntityRef<FiltronVehicle> _filtron_vehicle;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmake_idChanging(int value);
    partial void Onmake_idChanged();
    partial void Onmake_createdChanging(System.DateTime value);
    partial void Onmake_createdChanged();
    partial void Onmake_modifiedChanging(System.DateTime value);
    partial void Onmake_modifiedChanged();
    partial void Onmake_nameChanging(string value);
    partial void Onmake_nameChanged();
    partial void Onmake_descriptionChanging(string value);
    partial void Onmake_descriptionChanged();
    partial void Onvehicle_idChanging(int value);
    partial void Onvehicle_idChanged();
    #endregion
		
		public FiltronMake()
		{
			this._filtron_models = new EntitySet<FiltronModel>(new Action<FiltronModel>(this.attach_filtron_models), new Action<FiltronModel>(this.detach_filtron_models));
			this._filtron_vehicle = default(EntityRef<FiltronVehicle>);
			OnCreated();
		}
		
		[Column(Storage="_make_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int make_id
		{
			get
			{
				return this._make_id;
			}
			set
			{
				if ((this._make_id != value))
				{
					this.Onmake_idChanging(value);
					this.SendPropertyChanging();
					this._make_id = value;
					this.SendPropertyChanged("make_id");
					this.Onmake_idChanged();
				}
			}
		}
		
		[Column(Storage="_make_created", DbType="DateTime NOT NULL")]
		public System.DateTime make_created
		{
			get
			{
				return this._make_created;
			}
			set
			{
				if ((this._make_created != value))
				{
					this.Onmake_createdChanging(value);
					this.SendPropertyChanging();
					this._make_created = value;
					this.SendPropertyChanged("make_created");
					this.Onmake_createdChanged();
				}
			}
		}
		
		[Column(Storage="_make_modified", DbType="DateTime NOT NULL")]
		public System.DateTime make_modified
		{
			get
			{
				return this._make_modified;
			}
			set
			{
				if ((this._make_modified != value))
				{
					this.Onmake_modifiedChanging(value);
					this.SendPropertyChanging();
					this._make_modified = value;
					this.SendPropertyChanged("make_modified");
					this.Onmake_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_make_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string make_name
		{
			get
			{
				return this._make_name;
			}
			set
			{
				if ((this._make_name != value))
				{
					this.Onmake_nameChanging(value);
					this.SendPropertyChanging();
					this._make_name = value;
					this.SendPropertyChanged("make_name");
					this.Onmake_nameChanged();
				}
			}
		}
		
		[Column(Storage="_make_description", DbType="NVarChar(255)")]
		public string make_description
		{
			get
			{
				return this._make_description;
			}
			set
			{
				if ((this._make_description != value))
				{
					this.Onmake_descriptionChanging(value);
					this.SendPropertyChanging();
					this._make_description = value;
					this.SendPropertyChanged("make_description");
					this.Onmake_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_id", DbType="Int NOT NULL")]
		public int vehicle_id
		{
			get
			{
				return this._vehicle_id;
			}
			set
			{
				if ((this._vehicle_id != value))
				{
					if (this._filtron_vehicle.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvehicle_idChanging(value);
					this.SendPropertyChanging();
					this._vehicle_id = value;
					this.SendPropertyChanged("vehicle_id");
					this.Onvehicle_idChanged();
				}
			}
		}
		
		[Association(Name="FiltronMake_FiltronModel", Storage="_filtron_models", ThisKey="make_id", OtherKey="make_id")]
		public EntitySet<FiltronModel> FiltronModels
		{
			get
			{
				return this._filtron_models;
			}
			set
			{
				this._filtron_models.Assign(value);
			}
		}
		
		[Association(Name="FiltronVehicle_FiltronMake", Storage="_filtron_vehicle", ThisKey="vehicle_id", OtherKey="vehicle_id", IsForeignKey=true)]
		public FiltronVehicle FiltronVehicle
		{
			get
			{
				return this._filtron_vehicle.Entity;
			}
			set
			{
				FiltronVehicle previousValue = this._filtron_vehicle.Entity;
				if (((previousValue != value) 
							|| (this._filtron_vehicle.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_vehicle.Entity = null;
						previousValue.FiltronMakes.Remove(this);
					}
					this._filtron_vehicle.Entity = value;
					if ((value != null))
					{
						value.FiltronMakes.Add(this);
						this._vehicle_id = value.vehicle_id;
					}
					else
					{
						this._vehicle_id = default(int);
					}
					this.SendPropertyChanged("FiltronVehicle");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_models(FiltronModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronMake = this;
		}
		
		private void detach_filtron_models(FiltronModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronMake = null;
		}
	}
	
	[Table(Name="dbo.filtron_models")]
	public partial class FiltronModel : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _model_id;
		
		private System.DateTime _model_created;
		
		private System.DateTime _model_modified;
		
		private string _model_name;
		
		private string _model_description;
		
		private System.Nullable<int> _model_year_from;
		
		private System.Nullable<int> _model_year_to;
		
		private int _make_id;
		
		private EntitySet<FiltronEngineModel> _filtron_engine_models;
		
		private EntitySet<FiltronFilterEngine> _FiltronFilterEngines;
		
		private EntityRef<FiltronMake> _filtron_make;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmodel_idChanging(int value);
    partial void Onmodel_idChanged();
    partial void Onmodel_createdChanging(System.DateTime value);
    partial void Onmodel_createdChanged();
    partial void Onmodel_modifiedChanging(System.DateTime value);
    partial void Onmodel_modifiedChanged();
    partial void Onmodel_nameChanging(string value);
    partial void Onmodel_nameChanged();
    partial void Onmodel_descriptionChanging(string value);
    partial void Onmodel_descriptionChanged();
    partial void Onmodel_year_fromChanging(System.Nullable<int> value);
    partial void Onmodel_year_fromChanged();
    partial void Onmodel_year_toChanging(System.Nullable<int> value);
    partial void Onmodel_year_toChanged();
    partial void Onmake_idChanging(int value);
    partial void Onmake_idChanged();
    #endregion
		
		public FiltronModel()
		{
			this._filtron_engine_models = new EntitySet<FiltronEngineModel>(new Action<FiltronEngineModel>(this.attach_filtron_engine_models), new Action<FiltronEngineModel>(this.detach_filtron_engine_models));
			this._FiltronFilterEngines = new EntitySet<FiltronFilterEngine>(new Action<FiltronFilterEngine>(this.attach_FiltronFilterEngines), new Action<FiltronFilterEngine>(this.detach_FiltronFilterEngines));
			this._filtron_make = default(EntityRef<FiltronMake>);
			OnCreated();
		}
		
		[Column(Storage="_model_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_created", DbType="DateTime NOT NULL")]
		public System.DateTime model_created
		{
			get
			{
				return this._model_created;
			}
			set
			{
				if ((this._model_created != value))
				{
					this.Onmodel_createdChanging(value);
					this.SendPropertyChanging();
					this._model_created = value;
					this.SendPropertyChanged("model_created");
					this.Onmodel_createdChanged();
				}
			}
		}
		
		[Column(Storage="_model_modified", DbType="DateTime NOT NULL")]
		public System.DateTime model_modified
		{
			get
			{
				return this._model_modified;
			}
			set
			{
				if ((this._model_modified != value))
				{
					this.Onmodel_modifiedChanging(value);
					this.SendPropertyChanging();
					this._model_modified = value;
					this.SendPropertyChanged("model_modified");
					this.Onmodel_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_model_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string model_name
		{
			get
			{
				return this._model_name;
			}
			set
			{
				if ((this._model_name != value))
				{
					this.Onmodel_nameChanging(value);
					this.SendPropertyChanging();
					this._model_name = value;
					this.SendPropertyChanged("model_name");
					this.Onmodel_nameChanged();
				}
			}
		}
		
		[Column(Storage="_model_description", DbType="NVarChar(255)")]
		public string model_description
		{
			get
			{
				return this._model_description;
			}
			set
			{
				if ((this._model_description != value))
				{
					this.Onmodel_descriptionChanging(value);
					this.SendPropertyChanging();
					this._model_description = value;
					this.SendPropertyChanged("model_description");
					this.Onmodel_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_model_year_from", DbType="Int")]
		public System.Nullable<int> model_year_from
		{
			get
			{
				return this._model_year_from;
			}
			set
			{
				if ((this._model_year_from != value))
				{
					this.Onmodel_year_fromChanging(value);
					this.SendPropertyChanging();
					this._model_year_from = value;
					this.SendPropertyChanged("model_year_from");
					this.Onmodel_year_fromChanged();
				}
			}
		}
		
		[Column(Storage="_model_year_to", DbType="Int")]
		public System.Nullable<int> model_year_to
		{
			get
			{
				return this._model_year_to;
			}
			set
			{
				if ((this._model_year_to != value))
				{
					this.Onmodel_year_toChanging(value);
					this.SendPropertyChanging();
					this._model_year_to = value;
					this.SendPropertyChanged("model_year_to");
					this.Onmodel_year_toChanged();
				}
			}
		}
		
		[Column(Storage="_make_id", DbType="Int NOT NULL")]
		public int make_id
		{
			get
			{
				return this._make_id;
			}
			set
			{
				if ((this._make_id != value))
				{
					if (this._filtron_make.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmake_idChanging(value);
					this.SendPropertyChanging();
					this._make_id = value;
					this.SendPropertyChanged("make_id");
					this.Onmake_idChanged();
				}
			}
		}
		
		[Association(Name="FiltronModel_FiltronEngineModel", Storage="_filtron_engine_models", ThisKey="model_id", OtherKey="model_id")]
		public EntitySet<FiltronEngineModel> FiltronEngineModels
		{
			get
			{
				return this._filtron_engine_models;
			}
			set
			{
				this._filtron_engine_models.Assign(value);
			}
		}
		
		[Association(Name="FiltronModel_FiltronFilterEngine", Storage="_FiltronFilterEngines", ThisKey="model_id", OtherKey="model_id")]
		public EntitySet<FiltronFilterEngine> FiltronFilterEngines
		{
			get
			{
				return this._FiltronFilterEngines;
			}
			set
			{
				this._FiltronFilterEngines.Assign(value);
			}
		}
		
		[Association(Name="FiltronMake_FiltronModel", Storage="_filtron_make", ThisKey="make_id", OtherKey="make_id", IsForeignKey=true)]
		public FiltronMake FiltronMake
		{
			get
			{
				return this._filtron_make.Entity;
			}
			set
			{
				FiltronMake previousValue = this._filtron_make.Entity;
				if (((previousValue != value) 
							|| (this._filtron_make.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_make.Entity = null;
						previousValue.FiltronModels.Remove(this);
					}
					this._filtron_make.Entity = value;
					if ((value != null))
					{
						value.FiltronModels.Add(this);
						this._make_id = value.make_id;
					}
					else
					{
						this._make_id = default(int);
					}
					this.SendPropertyChanged("FiltronMake");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_engine_models(FiltronEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronModel = this;
		}
		
		private void detach_filtron_engine_models(FiltronEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.FiltronModel = null;
		}
		
		private void attach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronModel = this;
		}
		
		private void detach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronModel = null;
		}
	}
	
	[Table(Name="dbo.filtron_vehicles")]
	public partial class FiltronVehicle : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _vehicle_id;
		
		private System.DateTime _vehicle_created;
		
		private System.DateTime _vehicle_modified;
		
		private string _vehicle_name;
		
		private string _vehicle_description;
		
		private EntitySet<FiltronMake> _filtron_makes;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onvehicle_idChanging(int value);
    partial void Onvehicle_idChanged();
    partial void Onvehicle_createdChanging(System.DateTime value);
    partial void Onvehicle_createdChanged();
    partial void Onvehicle_modifiedChanging(System.DateTime value);
    partial void Onvehicle_modifiedChanged();
    partial void Onvehicle_nameChanging(string value);
    partial void Onvehicle_nameChanged();
    partial void Onvehicle_descriptionChanging(string value);
    partial void Onvehicle_descriptionChanged();
    #endregion
		
		public FiltronVehicle()
		{
			this._filtron_makes = new EntitySet<FiltronMake>(new Action<FiltronMake>(this.attach_filtron_makes), new Action<FiltronMake>(this.detach_filtron_makes));
			OnCreated();
		}
		
		[Column(Storage="_vehicle_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int vehicle_id
		{
			get
			{
				return this._vehicle_id;
			}
			set
			{
				if ((this._vehicle_id != value))
				{
					this.Onvehicle_idChanging(value);
					this.SendPropertyChanging();
					this._vehicle_id = value;
					this.SendPropertyChanged("vehicle_id");
					this.Onvehicle_idChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_created", DbType="DateTime NOT NULL")]
		public System.DateTime vehicle_created
		{
			get
			{
				return this._vehicle_created;
			}
			set
			{
				if ((this._vehicle_created != value))
				{
					this.Onvehicle_createdChanging(value);
					this.SendPropertyChanging();
					this._vehicle_created = value;
					this.SendPropertyChanged("vehicle_created");
					this.Onvehicle_createdChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_modified", DbType="DateTime NOT NULL")]
		public System.DateTime vehicle_modified
		{
			get
			{
				return this._vehicle_modified;
			}
			set
			{
				if ((this._vehicle_modified != value))
				{
					this.Onvehicle_modifiedChanging(value);
					this.SendPropertyChanging();
					this._vehicle_modified = value;
					this.SendPropertyChanged("vehicle_modified");
					this.Onvehicle_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string vehicle_name
		{
			get
			{
				return this._vehicle_name;
			}
			set
			{
				if ((this._vehicle_name != value))
				{
					this.Onvehicle_nameChanging(value);
					this.SendPropertyChanging();
					this._vehicle_name = value;
					this.SendPropertyChanged("vehicle_name");
					this.Onvehicle_nameChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_description", DbType="NVarChar(255)")]
		public string vehicle_description
		{
			get
			{
				return this._vehicle_description;
			}
			set
			{
				if ((this._vehicle_description != value))
				{
					this.Onvehicle_descriptionChanging(value);
					this.SendPropertyChanging();
					this._vehicle_description = value;
					this.SendPropertyChanged("vehicle_description");
					this.Onvehicle_descriptionChanged();
				}
			}
		}
		
		[Association(Name="FiltronVehicle_FiltronMake", Storage="_filtron_makes", ThisKey="vehicle_id", OtherKey="vehicle_id")]
		public EntitySet<FiltronMake> FiltronMakes
		{
			get
			{
				return this._filtron_makes;
			}
			set
			{
				this._filtron_makes.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_makes(FiltronMake entity)
		{
			this.SendPropertyChanging();
			entity.FiltronVehicle = this;
		}
		
		private void detach_filtron_makes(FiltronMake entity)
		{
			this.SendPropertyChanging();
			entity.FiltronVehicle = null;
		}
	}
	
	[Table(Name="dbo.wix_engine_models")]
	public partial class WixEngineModel : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _engine_model_id;
		
		private System.DateTime _engine_model_created;
		
		private System.DateTime _engine_model_modified;
		
		private int _engine_id;
		
		private int _model_id;
		
		private EntityRef<WixEngine> _wix_engine;
		
		private EntityRef<WixModel> _wix_model;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onengine_model_idChanging(int value);
    partial void Onengine_model_idChanged();
    partial void Onengine_model_createdChanging(System.DateTime value);
    partial void Onengine_model_createdChanged();
    partial void Onengine_model_modifiedChanging(System.DateTime value);
    partial void Onengine_model_modifiedChanged();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onmodel_idChanging(int value);
    partial void Onmodel_idChanged();
    #endregion
		
		public WixEngineModel()
		{
			this._wix_engine = default(EntityRef<WixEngine>);
			this._wix_model = default(EntityRef<WixModel>);
			OnCreated();
		}
		
		[Column(Storage="_engine_model_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int engine_model_id
		{
			get
			{
				return this._engine_model_id;
			}
			set
			{
				if ((this._engine_model_id != value))
				{
					this.Onengine_model_idChanging(value);
					this.SendPropertyChanging();
					this._engine_model_id = value;
					this.SendPropertyChanged("engine_model_id");
					this.Onengine_model_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_model_created", DbType="DateTime NOT NULL")]
		public System.DateTime engine_model_created
		{
			get
			{
				return this._engine_model_created;
			}
			set
			{
				if ((this._engine_model_created != value))
				{
					this.Onengine_model_createdChanging(value);
					this.SendPropertyChanging();
					this._engine_model_created = value;
					this.SendPropertyChanged("engine_model_created");
					this.Onengine_model_createdChanged();
				}
			}
		}
		
		[Column(Storage="_engine_model_modified", DbType="DateTime NOT NULL")]
		public System.DateTime engine_model_modified
		{
			get
			{
				return this._engine_model_modified;
			}
			set
			{
				if ((this._engine_model_modified != value))
				{
					this.Onengine_model_modifiedChanging(value);
					this.SendPropertyChanging();
					this._engine_model_modified = value;
					this.SendPropertyChanged("engine_model_modified");
					this.Onengine_model_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_engine_id", DbType="Int NOT NULL")]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					if (this._wix_engine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_id", DbType="Int NOT NULL")]
		public int model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					if (this._wix_model.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Association(Name="WixEngine_WixEngineModel", Storage="_wix_engine", ThisKey="engine_id", OtherKey="engine_id", IsForeignKey=true)]
		public WixEngine WixEngine
		{
			get
			{
				return this._wix_engine.Entity;
			}
			set
			{
				WixEngine previousValue = this._wix_engine.Entity;
				if (((previousValue != value) 
							|| (this._wix_engine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_engine.Entity = null;
						previousValue.WixEngineModels.Remove(this);
					}
					this._wix_engine.Entity = value;
					if ((value != null))
					{
						value.WixEngineModels.Add(this);
						this._engine_id = value.engine_id;
					}
					else
					{
						this._engine_id = default(int);
					}
					this.SendPropertyChanged("WixEngine");
				}
			}
		}
		
		[Association(Name="WixModel_WixEngineModel", Storage="_wix_model", ThisKey="model_id", OtherKey="model_id", IsForeignKey=true)]
		public WixModel WixModel
		{
			get
			{
				return this._wix_model.Entity;
			}
			set
			{
				WixModel previousValue = this._wix_model.Entity;
				if (((previousValue != value) 
							|| (this._wix_model.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_model.Entity = null;
						previousValue.WixEngineModels.Remove(this);
					}
					this._wix_model.Entity = value;
					if ((value != null))
					{
						value.WixEngineModels.Add(this);
						this._model_id = value.model_id;
					}
					else
					{
						this._model_id = default(int);
					}
					this.SendPropertyChanged("WixModel");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_engines")]
	public partial class WixEngine : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _engine_id;
		
		private System.DateTime _engine_created;
		
		private System.DateTime _engine_modified;
		
		private string _engine_name;
		
		private string _engine_description;
		
		private string _engine_cubic_capacity;
		
		private string _engine_code;
		
		private string _engine_horse_power;
		
		private System.Nullable<int> _engine_year_from;
		
		private System.Nullable<int> _engine_year_to;
		
		private EntitySet<WixEngineModel> _wix_engine_models;
		
		private EntitySet<WixFilterEngine> _WixFilterEngines;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onengine_createdChanging(System.DateTime value);
    partial void Onengine_createdChanged();
    partial void Onengine_modifiedChanging(System.DateTime value);
    partial void Onengine_modifiedChanged();
    partial void Onengine_nameChanging(string value);
    partial void Onengine_nameChanged();
    partial void Onengine_descriptionChanging(string value);
    partial void Onengine_descriptionChanged();
    partial void Onengine_cubic_capacityChanging(string value);
    partial void Onengine_cubic_capacityChanged();
    partial void Onengine_codeChanging(string value);
    partial void Onengine_codeChanged();
    partial void Onengine_horse_powerChanging(string value);
    partial void Onengine_horse_powerChanged();
    partial void Onengine_year_fromChanging(System.Nullable<int> value);
    partial void Onengine_year_fromChanged();
    partial void Onengine_year_toChanging(System.Nullable<int> value);
    partial void Onengine_year_toChanged();
    #endregion
		
		public WixEngine()
		{
			this._wix_engine_models = new EntitySet<WixEngineModel>(new Action<WixEngineModel>(this.attach_wix_engine_models), new Action<WixEngineModel>(this.detach_wix_engine_models));
			this._WixFilterEngines = new EntitySet<WixFilterEngine>(new Action<WixFilterEngine>(this.attach_WixFilterEngines), new Action<WixFilterEngine>(this.detach_WixFilterEngines));
			OnCreated();
		}
		
		[Column(Storage="_engine_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_created", DbType="DateTime NOT NULL")]
		public System.DateTime engine_created
		{
			get
			{
				return this._engine_created;
			}
			set
			{
				if ((this._engine_created != value))
				{
					this.Onengine_createdChanging(value);
					this.SendPropertyChanging();
					this._engine_created = value;
					this.SendPropertyChanged("engine_created");
					this.Onengine_createdChanged();
				}
			}
		}
		
		[Column(Storage="_engine_modified", DbType="DateTime NOT NULL")]
		public System.DateTime engine_modified
		{
			get
			{
				return this._engine_modified;
			}
			set
			{
				if ((this._engine_modified != value))
				{
					this.Onengine_modifiedChanging(value);
					this.SendPropertyChanging();
					this._engine_modified = value;
					this.SendPropertyChanged("engine_modified");
					this.Onengine_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_engine_name", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string engine_name
		{
			get
			{
				return this._engine_name;
			}
			set
			{
				if ((this._engine_name != value))
				{
					this.Onengine_nameChanging(value);
					this.SendPropertyChanging();
					this._engine_name = value;
					this.SendPropertyChanged("engine_name");
					this.Onengine_nameChanged();
				}
			}
		}
		
		[Column(Storage="_engine_description", DbType="NVarChar(255)")]
		public string engine_description
		{
			get
			{
				return this._engine_description;
			}
			set
			{
				if ((this._engine_description != value))
				{
					this.Onengine_descriptionChanging(value);
					this.SendPropertyChanging();
					this._engine_description = value;
					this.SendPropertyChanged("engine_description");
					this.Onengine_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_engine_cubic_capacity", DbType="NVarChar(255)")]
		public string engine_cubic_capacity
		{
			get
			{
				return this._engine_cubic_capacity;
			}
			set
			{
				if ((this._engine_cubic_capacity != value))
				{
					this.Onengine_cubic_capacityChanging(value);
					this.SendPropertyChanging();
					this._engine_cubic_capacity = value;
					this.SendPropertyChanged("engine_cubic_capacity");
					this.Onengine_cubic_capacityChanged();
				}
			}
		}
		
		[Column(Storage="_engine_code", DbType="NVarChar(255)")]
		public string engine_code
		{
			get
			{
				return this._engine_code;
			}
			set
			{
				if ((this._engine_code != value))
				{
					this.Onengine_codeChanging(value);
					this.SendPropertyChanging();
					this._engine_code = value;
					this.SendPropertyChanged("engine_code");
					this.Onengine_codeChanged();
				}
			}
		}
		
		[Column(Storage="_engine_horse_power", DbType="NVarChar(255)")]
		public string engine_horse_power
		{
			get
			{
				return this._engine_horse_power;
			}
			set
			{
				if ((this._engine_horse_power != value))
				{
					this.Onengine_horse_powerChanging(value);
					this.SendPropertyChanging();
					this._engine_horse_power = value;
					this.SendPropertyChanged("engine_horse_power");
					this.Onengine_horse_powerChanged();
				}
			}
		}
		
		[Column(Storage="_engine_year_from", DbType="Int")]
		public System.Nullable<int> engine_year_from
		{
			get
			{
				return this._engine_year_from;
			}
			set
			{
				if ((this._engine_year_from != value))
				{
					this.Onengine_year_fromChanging(value);
					this.SendPropertyChanging();
					this._engine_year_from = value;
					this.SendPropertyChanged("engine_year_from");
					this.Onengine_year_fromChanged();
				}
			}
		}
		
		[Column(Storage="_engine_year_to", DbType="Int")]
		public System.Nullable<int> engine_year_to
		{
			get
			{
				return this._engine_year_to;
			}
			set
			{
				if ((this._engine_year_to != value))
				{
					this.Onengine_year_toChanging(value);
					this.SendPropertyChanging();
					this._engine_year_to = value;
					this.SendPropertyChanged("engine_year_to");
					this.Onengine_year_toChanged();
				}
			}
		}
		
		[Association(Name="WixEngine_WixEngineModel", Storage="_wix_engine_models", ThisKey="engine_id", OtherKey="engine_id")]
		public EntitySet<WixEngineModel> WixEngineModels
		{
			get
			{
				return this._wix_engine_models;
			}
			set
			{
				this._wix_engine_models.Assign(value);
			}
		}
		
		[Association(Name="WixEngine_WixFilterEngine", Storage="_WixFilterEngines", ThisKey="engine_id", OtherKey="engine_id")]
		public EntitySet<WixFilterEngine> WixFilterEngines
		{
			get
			{
				return this._WixFilterEngines;
			}
			set
			{
				this._WixFilterEngines.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_engine_models(WixEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.WixEngine = this;
		}
		
		private void detach_wix_engine_models(WixEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.WixEngine = null;
		}
		
		private void attach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixEngine = this;
		}
		
		private void detach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixEngine = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_medias")]
	public partial class WixFilterMedia : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _media_id;
		
		private System.DateTime _media_created;
		
		private System.DateTime _media_modified;
		
		private string _media_name;
		
		private string _media_abbr;
		
		private EntitySet<WixFilter> _WixFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmedia_idChanging(int value);
    partial void Onmedia_idChanged();
    partial void Onmedia_createdChanging(System.DateTime value);
    partial void Onmedia_createdChanged();
    partial void Onmedia_modifiedChanging(System.DateTime value);
    partial void Onmedia_modifiedChanged();
    partial void Onmedia_nameChanging(string value);
    partial void Onmedia_nameChanged();
    partial void Onmedia_abbrChanging(string value);
    partial void Onmedia_abbrChanged();
    #endregion
		
		public WixFilterMedia()
		{
			this._WixFilters = new EntitySet<WixFilter>(new Action<WixFilter>(this.attach_WixFilters), new Action<WixFilter>(this.detach_WixFilters));
			OnCreated();
		}
		
		[Column(Storage="_media_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int media_id
		{
			get
			{
				return this._media_id;
			}
			set
			{
				if ((this._media_id != value))
				{
					this.Onmedia_idChanging(value);
					this.SendPropertyChanging();
					this._media_id = value;
					this.SendPropertyChanged("media_id");
					this.Onmedia_idChanged();
				}
			}
		}
		
		[Column(Storage="_media_created", DbType="DateTime NOT NULL")]
		public System.DateTime media_created
		{
			get
			{
				return this._media_created;
			}
			set
			{
				if ((this._media_created != value))
				{
					this.Onmedia_createdChanging(value);
					this.SendPropertyChanging();
					this._media_created = value;
					this.SendPropertyChanged("media_created");
					this.Onmedia_createdChanged();
				}
			}
		}
		
		[Column(Storage="_media_modified", DbType="DateTime NOT NULL")]
		public System.DateTime media_modified
		{
			get
			{
				return this._media_modified;
			}
			set
			{
				if ((this._media_modified != value))
				{
					this.Onmedia_modifiedChanging(value);
					this.SendPropertyChanging();
					this._media_modified = value;
					this.SendPropertyChanged("media_modified");
					this.Onmedia_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_media_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string media_name
		{
			get
			{
				return this._media_name;
			}
			set
			{
				if ((this._media_name != value))
				{
					this.Onmedia_nameChanging(value);
					this.SendPropertyChanging();
					this._media_name = value;
					this.SendPropertyChanged("media_name");
					this.Onmedia_nameChanged();
				}
			}
		}
		
		[Column(Storage="_media_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string media_abbr
		{
			get
			{
				return this._media_abbr;
			}
			set
			{
				if ((this._media_abbr != value))
				{
					this.Onmedia_abbrChanging(value);
					this.SendPropertyChanging();
					this._media_abbr = value;
					this.SendPropertyChanged("media_abbr");
					this.Onmedia_abbrChanged();
				}
			}
		}
		
		[Association(Name="WixFilterMedia_WixFilter", Storage="_WixFilters", ThisKey="media_id", OtherKey="filter_media_id")]
		public EntitySet<WixFilter> WixFilters
		{
			get
			{
				return this._WixFilters;
			}
			set
			{
				this._WixFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterMedia = this;
		}
		
		private void detach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterMedia = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_shapes")]
	public partial class WixFilterShape : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _shape_id;
		
		private System.DateTime _shape_created;
		
		private System.DateTime _shape_modified;
		
		private string _shape_name;
		
		private string _shape_abbr;
		
		private EntitySet<WixFilterTypeShape> _wix_filter_type_shapes;
		
		private EntitySet<WixFilter> _WixFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onshape_idChanging(int value);
    partial void Onshape_idChanged();
    partial void Onshape_createdChanging(System.DateTime value);
    partial void Onshape_createdChanged();
    partial void Onshape_modifiedChanging(System.DateTime value);
    partial void Onshape_modifiedChanged();
    partial void Onshape_nameChanging(string value);
    partial void Onshape_nameChanged();
    partial void Onshape_abbrChanging(string value);
    partial void Onshape_abbrChanged();
    #endregion
		
		public WixFilterShape()
		{
			this._wix_filter_type_shapes = new EntitySet<WixFilterTypeShape>(new Action<WixFilterTypeShape>(this.attach_wix_filter_type_shapes), new Action<WixFilterTypeShape>(this.detach_wix_filter_type_shapes));
			this._WixFilters = new EntitySet<WixFilter>(new Action<WixFilter>(this.attach_WixFilters), new Action<WixFilter>(this.detach_WixFilters));
			OnCreated();
		}
		
		[Column(Storage="_shape_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int shape_id
		{
			get
			{
				return this._shape_id;
			}
			set
			{
				if ((this._shape_id != value))
				{
					this.Onshape_idChanging(value);
					this.SendPropertyChanging();
					this._shape_id = value;
					this.SendPropertyChanged("shape_id");
					this.Onshape_idChanged();
				}
			}
		}
		
		[Column(Storage="_shape_created", DbType="DateTime NOT NULL")]
		public System.DateTime shape_created
		{
			get
			{
				return this._shape_created;
			}
			set
			{
				if ((this._shape_created != value))
				{
					this.Onshape_createdChanging(value);
					this.SendPropertyChanging();
					this._shape_created = value;
					this.SendPropertyChanged("shape_created");
					this.Onshape_createdChanged();
				}
			}
		}
		
		[Column(Storage="_shape_modified", DbType="DateTime NOT NULL")]
		public System.DateTime shape_modified
		{
			get
			{
				return this._shape_modified;
			}
			set
			{
				if ((this._shape_modified != value))
				{
					this.Onshape_modifiedChanging(value);
					this.SendPropertyChanging();
					this._shape_modified = value;
					this.SendPropertyChanged("shape_modified");
					this.Onshape_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_shape_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string shape_name
		{
			get
			{
				return this._shape_name;
			}
			set
			{
				if ((this._shape_name != value))
				{
					this.Onshape_nameChanging(value);
					this.SendPropertyChanging();
					this._shape_name = value;
					this.SendPropertyChanged("shape_name");
					this.Onshape_nameChanged();
				}
			}
		}
		
		[Column(Storage="_shape_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string shape_abbr
		{
			get
			{
				return this._shape_abbr;
			}
			set
			{
				if ((this._shape_abbr != value))
				{
					this.Onshape_abbrChanging(value);
					this.SendPropertyChanging();
					this._shape_abbr = value;
					this.SendPropertyChanged("shape_abbr");
					this.Onshape_abbrChanged();
				}
			}
		}
		
		[Association(Name="WixFilterShape_WixFilterTypeShape", Storage="_wix_filter_type_shapes", ThisKey="shape_id", OtherKey="shape_id")]
		public EntitySet<WixFilterTypeShape> WixFilterTypeShapes
		{
			get
			{
				return this._wix_filter_type_shapes;
			}
			set
			{
				this._wix_filter_type_shapes.Assign(value);
			}
		}
		
		[Association(Name="WixFilterShape_WixFilter", Storage="_WixFilters", ThisKey="shape_id", OtherKey="filter_shape_id")]
		public EntitySet<WixFilter> WixFilters
		{
			get
			{
				return this._WixFilters;
			}
			set
			{
				this._WixFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_filter_type_shapes(WixFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterShape = this;
		}
		
		private void detach_wix_filter_type_shapes(WixFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterShape = null;
		}
		
		private void attach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterShape = this;
		}
		
		private void detach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterShape = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_styles")]
	public partial class WixFilterStyle : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _style_id;
		
		private System.DateTime _style_created;
		
		private System.DateTime _style_modified;
		
		private string _style_name;
		
		private string _style_abbr;
		
		private EntitySet<WixFilter> _WixFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onstyle_idChanging(int value);
    partial void Onstyle_idChanged();
    partial void Onstyle_createdChanging(System.DateTime value);
    partial void Onstyle_createdChanged();
    partial void Onstyle_modifiedChanging(System.DateTime value);
    partial void Onstyle_modifiedChanged();
    partial void Onstyle_nameChanging(string value);
    partial void Onstyle_nameChanged();
    partial void Onstyle_abbrChanging(string value);
    partial void Onstyle_abbrChanged();
    #endregion
		
		public WixFilterStyle()
		{
			this._WixFilters = new EntitySet<WixFilter>(new Action<WixFilter>(this.attach_WixFilters), new Action<WixFilter>(this.detach_WixFilters));
			OnCreated();
		}
		
		[Column(Storage="_style_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int style_id
		{
			get
			{
				return this._style_id;
			}
			set
			{
				if ((this._style_id != value))
				{
					this.Onstyle_idChanging(value);
					this.SendPropertyChanging();
					this._style_id = value;
					this.SendPropertyChanged("style_id");
					this.Onstyle_idChanged();
				}
			}
		}
		
		[Column(Storage="_style_created", DbType="DateTime NOT NULL")]
		public System.DateTime style_created
		{
			get
			{
				return this._style_created;
			}
			set
			{
				if ((this._style_created != value))
				{
					this.Onstyle_createdChanging(value);
					this.SendPropertyChanging();
					this._style_created = value;
					this.SendPropertyChanged("style_created");
					this.Onstyle_createdChanged();
				}
			}
		}
		
		[Column(Storage="_style_modified", DbType="DateTime NOT NULL")]
		public System.DateTime style_modified
		{
			get
			{
				return this._style_modified;
			}
			set
			{
				if ((this._style_modified != value))
				{
					this.Onstyle_modifiedChanging(value);
					this.SendPropertyChanging();
					this._style_modified = value;
					this.SendPropertyChanged("style_modified");
					this.Onstyle_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_style_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string style_name
		{
			get
			{
				return this._style_name;
			}
			set
			{
				if ((this._style_name != value))
				{
					this.Onstyle_nameChanging(value);
					this.SendPropertyChanging();
					this._style_name = value;
					this.SendPropertyChanged("style_name");
					this.Onstyle_nameChanged();
				}
			}
		}
		
		[Column(Storage="_style_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string style_abbr
		{
			get
			{
				return this._style_abbr;
			}
			set
			{
				if ((this._style_abbr != value))
				{
					this.Onstyle_abbrChanging(value);
					this.SendPropertyChanging();
					this._style_abbr = value;
					this.SendPropertyChanged("style_abbr");
					this.Onstyle_abbrChanged();
				}
			}
		}
		
		[Association(Name="WixFilterStyle_WixFilter", Storage="_WixFilters", ThisKey="style_id", OtherKey="filter_style_id")]
		public EntitySet<WixFilter> WixFilters
		{
			get
			{
				return this._WixFilters;
			}
			set
			{
				this._WixFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterStyle = this;
		}
		
		private void detach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterStyle = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_type_shapes")]
	public partial class WixFilterTypeShape : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _type_shape_id;
		
		private System.DateTime _type_shape_created;
		
		private System.DateTime _type_shape_modified;
		
		private int _type_id;
		
		private int _shape_id;
		
		private System.Nullable<bool> _height_dim_available;
		
		private System.Nullable<bool> _width_dim_available;
		
		private System.Nullable<bool> _length_dim_available;
		
		private System.Nullable<bool> _outside_dia_top_dim_available;
		
		private System.Nullable<bool> _outside_dia_bottom_dim_available;
		
		private System.Nullable<bool> _inside_dia_top_dim_available;
		
		private System.Nullable<bool> _inside_dia_bottom_dim_available;
		
		private EntityRef<WixFilterShape> _wix_filter_shape;
		
		private EntityRef<WixFilterType> _wix_filter_type;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontype_shape_idChanging(int value);
    partial void Ontype_shape_idChanged();
    partial void Ontype_shape_createdChanging(System.DateTime value);
    partial void Ontype_shape_createdChanged();
    partial void Ontype_shape_modifiedChanging(System.DateTime value);
    partial void Ontype_shape_modifiedChanged();
    partial void Ontype_idChanging(int value);
    partial void Ontype_idChanged();
    partial void Onshape_idChanging(int value);
    partial void Onshape_idChanged();
    partial void Onheight_dim_availableChanging(System.Nullable<bool> value);
    partial void Onheight_dim_availableChanged();
    partial void Onwidth_dim_availableChanging(System.Nullable<bool> value);
    partial void Onwidth_dim_availableChanged();
    partial void Onlength_dim_availableChanging(System.Nullable<bool> value);
    partial void Onlength_dim_availableChanged();
    partial void Onoutside_dia_top_dim_availableChanging(System.Nullable<bool> value);
    partial void Onoutside_dia_top_dim_availableChanged();
    partial void Onoutside_dia_bottom_dim_availableChanging(System.Nullable<bool> value);
    partial void Onoutside_dia_bottom_dim_availableChanged();
    partial void Oninside_dia_top_dim_availableChanging(System.Nullable<bool> value);
    partial void Oninside_dia_top_dim_availableChanged();
    partial void Oninside_dia_bottom_dim_availableChanging(System.Nullable<bool> value);
    partial void Oninside_dia_bottom_dim_availableChanged();
    #endregion
		
		public WixFilterTypeShape()
		{
			this._wix_filter_shape = default(EntityRef<WixFilterShape>);
			this._wix_filter_type = default(EntityRef<WixFilterType>);
			OnCreated();
		}
		
		[Column(Storage="_type_shape_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int type_shape_id
		{
			get
			{
				return this._type_shape_id;
			}
			set
			{
				if ((this._type_shape_id != value))
				{
					this.Ontype_shape_idChanging(value);
					this.SendPropertyChanging();
					this._type_shape_id = value;
					this.SendPropertyChanged("type_shape_id");
					this.Ontype_shape_idChanged();
				}
			}
		}
		
		[Column(Storage="_type_shape_created", DbType="DateTime NOT NULL")]
		public System.DateTime type_shape_created
		{
			get
			{
				return this._type_shape_created;
			}
			set
			{
				if ((this._type_shape_created != value))
				{
					this.Ontype_shape_createdChanging(value);
					this.SendPropertyChanging();
					this._type_shape_created = value;
					this.SendPropertyChanged("type_shape_created");
					this.Ontype_shape_createdChanged();
				}
			}
		}
		
		[Column(Storage="_type_shape_modified", DbType="DateTime NOT NULL")]
		public System.DateTime type_shape_modified
		{
			get
			{
				return this._type_shape_modified;
			}
			set
			{
				if ((this._type_shape_modified != value))
				{
					this.Ontype_shape_modifiedChanging(value);
					this.SendPropertyChanging();
					this._type_shape_modified = value;
					this.SendPropertyChanged("type_shape_modified");
					this.Ontype_shape_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_type_id", DbType="Int NOT NULL")]
		public int type_id
		{
			get
			{
				return this._type_id;
			}
			set
			{
				if ((this._type_id != value))
				{
					if (this._wix_filter_type.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ontype_idChanging(value);
					this.SendPropertyChanging();
					this._type_id = value;
					this.SendPropertyChanged("type_id");
					this.Ontype_idChanged();
				}
			}
		}
		
		[Column(Storage="_shape_id", DbType="Int NOT NULL")]
		public int shape_id
		{
			get
			{
				return this._shape_id;
			}
			set
			{
				if ((this._shape_id != value))
				{
					if (this._wix_filter_shape.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onshape_idChanging(value);
					this.SendPropertyChanging();
					this._shape_id = value;
					this.SendPropertyChanged("shape_id");
					this.Onshape_idChanged();
				}
			}
		}
		
		[Column(Storage="_height_dim_available", DbType="Bit")]
		public System.Nullable<bool> height_dim_available
		{
			get
			{
				return this._height_dim_available;
			}
			set
			{
				if ((this._height_dim_available != value))
				{
					this.Onheight_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._height_dim_available = value;
					this.SendPropertyChanged("height_dim_available");
					this.Onheight_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_width_dim_available", DbType="Bit")]
		public System.Nullable<bool> width_dim_available
		{
			get
			{
				return this._width_dim_available;
			}
			set
			{
				if ((this._width_dim_available != value))
				{
					this.Onwidth_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._width_dim_available = value;
					this.SendPropertyChanged("width_dim_available");
					this.Onwidth_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_length_dim_available", DbType="Bit")]
		public System.Nullable<bool> length_dim_available
		{
			get
			{
				return this._length_dim_available;
			}
			set
			{
				if ((this._length_dim_available != value))
				{
					this.Onlength_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._length_dim_available = value;
					this.SendPropertyChanged("length_dim_available");
					this.Onlength_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_outside_dia_top_dim_available", DbType="Bit")]
		public System.Nullable<bool> outside_dia_top_dim_available
		{
			get
			{
				return this._outside_dia_top_dim_available;
			}
			set
			{
				if ((this._outside_dia_top_dim_available != value))
				{
					this.Onoutside_dia_top_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._outside_dia_top_dim_available = value;
					this.SendPropertyChanged("outside_dia_top_dim_available");
					this.Onoutside_dia_top_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_outside_dia_bottom_dim_available", DbType="Bit")]
		public System.Nullable<bool> outside_dia_bottom_dim_available
		{
			get
			{
				return this._outside_dia_bottom_dim_available;
			}
			set
			{
				if ((this._outside_dia_bottom_dim_available != value))
				{
					this.Onoutside_dia_bottom_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._outside_dia_bottom_dim_available = value;
					this.SendPropertyChanged("outside_dia_bottom_dim_available");
					this.Onoutside_dia_bottom_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_inside_dia_top_dim_available", DbType="Bit")]
		public System.Nullable<bool> inside_dia_top_dim_available
		{
			get
			{
				return this._inside_dia_top_dim_available;
			}
			set
			{
				if ((this._inside_dia_top_dim_available != value))
				{
					this.Oninside_dia_top_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._inside_dia_top_dim_available = value;
					this.SendPropertyChanged("inside_dia_top_dim_available");
					this.Oninside_dia_top_dim_availableChanged();
				}
			}
		}
		
		[Column(Storage="_inside_dia_bottom_dim_available", DbType="Bit")]
		public System.Nullable<bool> inside_dia_bottom_dim_available
		{
			get
			{
				return this._inside_dia_bottom_dim_available;
			}
			set
			{
				if ((this._inside_dia_bottom_dim_available != value))
				{
					this.Oninside_dia_bottom_dim_availableChanging(value);
					this.SendPropertyChanging();
					this._inside_dia_bottom_dim_available = value;
					this.SendPropertyChanged("inside_dia_bottom_dim_available");
					this.Oninside_dia_bottom_dim_availableChanged();
				}
			}
		}
		
		[Association(Name="WixFilterShape_WixFilterTypeShape", Storage="_wix_filter_shape", ThisKey="shape_id", OtherKey="shape_id", IsForeignKey=true)]
		public WixFilterShape WixFilterShape
		{
			get
			{
				return this._wix_filter_shape.Entity;
			}
			set
			{
				WixFilterShape previousValue = this._wix_filter_shape.Entity;
				if (((previousValue != value) 
							|| (this._wix_filter_shape.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_filter_shape.Entity = null;
						previousValue.WixFilterTypeShapes.Remove(this);
					}
					this._wix_filter_shape.Entity = value;
					if ((value != null))
					{
						value.WixFilterTypeShapes.Add(this);
						this._shape_id = value.shape_id;
					}
					else
					{
						this._shape_id = default(int);
					}
					this.SendPropertyChanged("WixFilterShape");
				}
			}
		}
		
		[Association(Name="WixFilterType_WixFilterTypeShape", Storage="_wix_filter_type", ThisKey="type_id", OtherKey="type_id", IsForeignKey=true)]
		public WixFilterType WixFilterType
		{
			get
			{
				return this._wix_filter_type.Entity;
			}
			set
			{
				WixFilterType previousValue = this._wix_filter_type.Entity;
				if (((previousValue != value) 
							|| (this._wix_filter_type.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_filter_type.Entity = null;
						previousValue.WixFilterTypeShapes.Remove(this);
					}
					this._wix_filter_type.Entity = value;
					if ((value != null))
					{
						value.WixFilterTypeShapes.Add(this);
						this._type_id = value.type_id;
					}
					else
					{
						this._type_id = default(int);
					}
					this.SendPropertyChanged("WixFilterType");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_filter_types")]
	public partial class WixFilterType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _type_id;
		
		private System.DateTime _type_created;
		
		private System.DateTime _type_modified;
		
		private string _type_name;
		
		private string _type_abbr;
		
		private EntitySet<WixFilterTypeShape> _wix_filter_type_shapes;
		
		private EntitySet<WixFilter> _WixFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ontype_idChanging(int value);
    partial void Ontype_idChanged();
    partial void Ontype_createdChanging(System.DateTime value);
    partial void Ontype_createdChanged();
    partial void Ontype_modifiedChanging(System.DateTime value);
    partial void Ontype_modifiedChanged();
    partial void Ontype_nameChanging(string value);
    partial void Ontype_nameChanged();
    partial void Ontype_abbrChanging(string value);
    partial void Ontype_abbrChanged();
    #endregion
		
		public WixFilterType()
		{
			this._wix_filter_type_shapes = new EntitySet<WixFilterTypeShape>(new Action<WixFilterTypeShape>(this.attach_wix_filter_type_shapes), new Action<WixFilterTypeShape>(this.detach_wix_filter_type_shapes));
			this._WixFilters = new EntitySet<WixFilter>(new Action<WixFilter>(this.attach_WixFilters), new Action<WixFilter>(this.detach_WixFilters));
			OnCreated();
		}
		
		[Column(Storage="_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int type_id
		{
			get
			{
				return this._type_id;
			}
			set
			{
				if ((this._type_id != value))
				{
					this.Ontype_idChanging(value);
					this.SendPropertyChanging();
					this._type_id = value;
					this.SendPropertyChanged("type_id");
					this.Ontype_idChanged();
				}
			}
		}
		
		[Column(Storage="_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime type_created
		{
			get
			{
				return this._type_created;
			}
			set
			{
				if ((this._type_created != value))
				{
					this.Ontype_createdChanging(value);
					this.SendPropertyChanging();
					this._type_created = value;
					this.SendPropertyChanged("type_created");
					this.Ontype_createdChanged();
				}
			}
		}
		
		[Column(Storage="_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime type_modified
		{
			get
			{
				return this._type_modified;
			}
			set
			{
				if ((this._type_modified != value))
				{
					this.Ontype_modifiedChanging(value);
					this.SendPropertyChanging();
					this._type_modified = value;
					this.SendPropertyChanged("type_modified");
					this.Ontype_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_type_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string type_name
		{
			get
			{
				return this._type_name;
			}
			set
			{
				if ((this._type_name != value))
				{
					this.Ontype_nameChanging(value);
					this.SendPropertyChanging();
					this._type_name = value;
					this.SendPropertyChanged("type_name");
					this.Ontype_nameChanged();
				}
			}
		}
		
		[Column(Storage="_type_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string type_abbr
		{
			get
			{
				return this._type_abbr;
			}
			set
			{
				if ((this._type_abbr != value))
				{
					this.Ontype_abbrChanging(value);
					this.SendPropertyChanging();
					this._type_abbr = value;
					this.SendPropertyChanged("type_abbr");
					this.Ontype_abbrChanged();
				}
			}
		}
		
		[Association(Name="WixFilterType_WixFilterTypeShape", Storage="_wix_filter_type_shapes", ThisKey="type_id", OtherKey="type_id")]
		public EntitySet<WixFilterTypeShape> WixFilterTypeShapes
		{
			get
			{
				return this._wix_filter_type_shapes;
			}
			set
			{
				this._wix_filter_type_shapes.Assign(value);
			}
		}
		
		[Association(Name="WixFilterType_WixFilter", Storage="_WixFilters", ThisKey="type_id", OtherKey="filter_type_id")]
		public EntitySet<WixFilter> WixFilters
		{
			get
			{
				return this._WixFilters;
			}
			set
			{
				this._WixFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_filter_type_shapes(WixFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterType = this;
		}
		
		private void detach_wix_filter_type_shapes(WixFilterTypeShape entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterType = null;
		}
		
		private void attach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterType = this;
		}
		
		private void detach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterType = null;
		}
	}
	
	[Table(Name="dbo.wix_interchange_manufacturers")]
	public partial class WixInterchangeManufacturer : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _manufacturer_id;
		
		private System.DateTime _manufacturer_created;
		
		private System.DateTime _manufacturer_modified;
		
		private string _manufacturer_name;
		
		private string _manufacturer_description;
		
		private EntitySet<WixInterchange> _wix_interchanges;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmanufacturer_idChanging(int value);
    partial void Onmanufacturer_idChanged();
    partial void Onmanufacturer_createdChanging(System.DateTime value);
    partial void Onmanufacturer_createdChanged();
    partial void Onmanufacturer_modifiedChanging(System.DateTime value);
    partial void Onmanufacturer_modifiedChanged();
    partial void Onmanufacturer_nameChanging(string value);
    partial void Onmanufacturer_nameChanged();
    partial void Onmanufacturer_descriptionChanging(string value);
    partial void Onmanufacturer_descriptionChanged();
    #endregion
		
		public WixInterchangeManufacturer()
		{
			this._wix_interchanges = new EntitySet<WixInterchange>(new Action<WixInterchange>(this.attach_wix_interchanges), new Action<WixInterchange>(this.detach_wix_interchanges));
			OnCreated();
		}
		
		[Column(Storage="_manufacturer_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int manufacturer_id
		{
			get
			{
				return this._manufacturer_id;
			}
			set
			{
				if ((this._manufacturer_id != value))
				{
					this.Onmanufacturer_idChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_id = value;
					this.SendPropertyChanged("manufacturer_id");
					this.Onmanufacturer_idChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_created", DbType="DateTime NOT NULL")]
		public System.DateTime manufacturer_created
		{
			get
			{
				return this._manufacturer_created;
			}
			set
			{
				if ((this._manufacturer_created != value))
				{
					this.Onmanufacturer_createdChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_created = value;
					this.SendPropertyChanged("manufacturer_created");
					this.Onmanufacturer_createdChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_modified", DbType="DateTime NOT NULL")]
		public System.DateTime manufacturer_modified
		{
			get
			{
				return this._manufacturer_modified;
			}
			set
			{
				if ((this._manufacturer_modified != value))
				{
					this.Onmanufacturer_modifiedChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_modified = value;
					this.SendPropertyChanged("manufacturer_modified");
					this.Onmanufacturer_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string manufacturer_name
		{
			get
			{
				return this._manufacturer_name;
			}
			set
			{
				if ((this._manufacturer_name != value))
				{
					this.Onmanufacturer_nameChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_name = value;
					this.SendPropertyChanged("manufacturer_name");
					this.Onmanufacturer_nameChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_description", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string manufacturer_description
		{
			get
			{
				return this._manufacturer_description;
			}
			set
			{
				if ((this._manufacturer_description != value))
				{
					this.Onmanufacturer_descriptionChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_description = value;
					this.SendPropertyChanged("manufacturer_description");
					this.Onmanufacturer_descriptionChanged();
				}
			}
		}
		
		[Association(Name="WixInterchangeManufacturer_WixInterchange", Storage="_wix_interchanges", ThisKey="manufacturer_id", OtherKey="manufacturer_id")]
		public EntitySet<WixInterchange> WixInterchanges
		{
			get
			{
				return this._wix_interchanges;
			}
			set
			{
				this._wix_interchanges.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_interchanges(WixInterchange entity)
		{
			this.SendPropertyChanging();
			entity.WixInterchangeManufacturer = this;
		}
		
		private void detach_wix_interchanges(WixInterchange entity)
		{
			this.SendPropertyChanging();
			entity.WixInterchangeManufacturer = null;
		}
	}
	
	[Table(Name="dbo.wix_interchanges")]
	public partial class WixInterchange : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _interchange_id;
		
		private System.DateTime _interchange_created;
		
		private System.DateTime _interchange_modified;
		
		private int _filter_id;
		
		private int _manufacturer_id;
		
		private string _foreign_filter_number;
		
		private string _foreign_filter_trim;
		
		private EntityRef<WixInterchangeManufacturer> _wix_interchange_manufacturer;
		
		private EntityRef<WixFilter> _WixFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Oninterchange_idChanging(int value);
    partial void Oninterchange_idChanged();
    partial void Oninterchange_createdChanging(System.DateTime value);
    partial void Oninterchange_createdChanged();
    partial void Oninterchange_modifiedChanging(System.DateTime value);
    partial void Oninterchange_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onmanufacturer_idChanging(int value);
    partial void Onmanufacturer_idChanged();
    partial void Onforeign_filter_numberChanging(string value);
    partial void Onforeign_filter_numberChanged();
    partial void Onforeign_filter_trimChanging(string value);
    partial void Onforeign_filter_trimChanged();
    #endregion
		
		public WixInterchange()
		{
			this._wix_interchange_manufacturer = default(EntityRef<WixInterchangeManufacturer>);
			this._WixFilter = default(EntityRef<WixFilter>);
			OnCreated();
		}
		
		[Column(Storage="_interchange_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int interchange_id
		{
			get
			{
				return this._interchange_id;
			}
			set
			{
				if ((this._interchange_id != value))
				{
					this.Oninterchange_idChanging(value);
					this.SendPropertyChanging();
					this._interchange_id = value;
					this.SendPropertyChanged("interchange_id");
					this.Oninterchange_idChanged();
				}
			}
		}
		
		[Column(Storage="_interchange_created", DbType="DateTime NOT NULL")]
		public System.DateTime interchange_created
		{
			get
			{
				return this._interchange_created;
			}
			set
			{
				if ((this._interchange_created != value))
				{
					this.Oninterchange_createdChanging(value);
					this.SendPropertyChanging();
					this._interchange_created = value;
					this.SendPropertyChanged("interchange_created");
					this.Oninterchange_createdChanged();
				}
			}
		}
		
		[Column(Storage="_interchange_modified", DbType="DateTime NOT NULL")]
		public System.DateTime interchange_modified
		{
			get
			{
				return this._interchange_modified;
			}
			set
			{
				if ((this._interchange_modified != value))
				{
					this.Oninterchange_modifiedChanging(value);
					this.SendPropertyChanging();
					this._interchange_modified = value;
					this.SendPropertyChanged("interchange_modified");
					this.Oninterchange_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._WixFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_id", DbType="Int NOT NULL")]
		public int manufacturer_id
		{
			get
			{
				return this._manufacturer_id;
			}
			set
			{
				if ((this._manufacturer_id != value))
				{
					if (this._wix_interchange_manufacturer.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmanufacturer_idChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_id = value;
					this.SendPropertyChanged("manufacturer_id");
					this.Onmanufacturer_idChanged();
				}
			}
		}
		
		[Column(Storage="_foreign_filter_number", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string foreign_filter_number
		{
			get
			{
				return this._foreign_filter_number;
			}
			set
			{
				if ((this._foreign_filter_number != value))
				{
					this.Onforeign_filter_numberChanging(value);
					this.SendPropertyChanging();
					this._foreign_filter_number = value;
					this.SendPropertyChanged("foreign_filter_number");
					this.Onforeign_filter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_foreign_filter_trim", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string foreign_filter_trim
		{
			get
			{
				return this._foreign_filter_trim;
			}
			set
			{
				if ((this._foreign_filter_trim != value))
				{
					this.Onforeign_filter_trimChanging(value);
					this.SendPropertyChanging();
					this._foreign_filter_trim = value;
					this.SendPropertyChanged("foreign_filter_trim");
					this.Onforeign_filter_trimChanged();
				}
			}
		}
		
		[Association(Name="WixInterchangeManufacturer_WixInterchange", Storage="_wix_interchange_manufacturer", ThisKey="manufacturer_id", OtherKey="manufacturer_id", IsForeignKey=true)]
		public WixInterchangeManufacturer WixInterchangeManufacturer
		{
			get
			{
				return this._wix_interchange_manufacturer.Entity;
			}
			set
			{
				WixInterchangeManufacturer previousValue = this._wix_interchange_manufacturer.Entity;
				if (((previousValue != value) 
							|| (this._wix_interchange_manufacturer.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_interchange_manufacturer.Entity = null;
						previousValue.WixInterchanges.Remove(this);
					}
					this._wix_interchange_manufacturer.Entity = value;
					if ((value != null))
					{
						value.WixInterchanges.Add(this);
						this._manufacturer_id = value.manufacturer_id;
					}
					else
					{
						this._manufacturer_id = default(int);
					}
					this.SendPropertyChanged("WixInterchangeManufacturer");
				}
			}
		}
		
		[Association(Name="WixFilter_WixInterchange", Storage="_WixFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public WixFilter WixFilter
		{
			get
			{
				return this._WixFilter.Entity;
			}
			set
			{
				WixFilter previousValue = this._WixFilter.Entity;
				if (((previousValue != value) 
							|| (this._WixFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilter.Entity = null;
						previousValue.WixInterchanges.Remove(this);
					}
					this._WixFilter.Entity = value;
					if ((value != null))
					{
						value.WixInterchanges.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("WixFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_makes")]
	public partial class WixMake : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _make_id;
		
		private System.DateTime _make_created;
		
		private System.DateTime _make_modified;
		
		private string _make_name;
		
		private string _make_description;
		
		private int _vehicle_id;
		
		private EntitySet<WixModel> _wix_models;
		
		private EntityRef<WixVehicle> _wix_vehicle;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmake_idChanging(int value);
    partial void Onmake_idChanged();
    partial void Onmake_createdChanging(System.DateTime value);
    partial void Onmake_createdChanged();
    partial void Onmake_modifiedChanging(System.DateTime value);
    partial void Onmake_modifiedChanged();
    partial void Onmake_nameChanging(string value);
    partial void Onmake_nameChanged();
    partial void Onmake_descriptionChanging(string value);
    partial void Onmake_descriptionChanged();
    partial void Onvehicle_idChanging(int value);
    partial void Onvehicle_idChanged();
    #endregion
		
		public WixMake()
		{
			this._wix_models = new EntitySet<WixModel>(new Action<WixModel>(this.attach_wix_models), new Action<WixModel>(this.detach_wix_models));
			this._wix_vehicle = default(EntityRef<WixVehicle>);
			OnCreated();
		}
		
		[Column(Storage="_make_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int make_id
		{
			get
			{
				return this._make_id;
			}
			set
			{
				if ((this._make_id != value))
				{
					this.Onmake_idChanging(value);
					this.SendPropertyChanging();
					this._make_id = value;
					this.SendPropertyChanged("make_id");
					this.Onmake_idChanged();
				}
			}
		}
		
		[Column(Storage="_make_created", DbType="DateTime NOT NULL")]
		public System.DateTime make_created
		{
			get
			{
				return this._make_created;
			}
			set
			{
				if ((this._make_created != value))
				{
					this.Onmake_createdChanging(value);
					this.SendPropertyChanging();
					this._make_created = value;
					this.SendPropertyChanged("make_created");
					this.Onmake_createdChanged();
				}
			}
		}
		
		[Column(Storage="_make_modified", DbType="DateTime NOT NULL")]
		public System.DateTime make_modified
		{
			get
			{
				return this._make_modified;
			}
			set
			{
				if ((this._make_modified != value))
				{
					this.Onmake_modifiedChanging(value);
					this.SendPropertyChanging();
					this._make_modified = value;
					this.SendPropertyChanged("make_modified");
					this.Onmake_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_make_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string make_name
		{
			get
			{
				return this._make_name;
			}
			set
			{
				if ((this._make_name != value))
				{
					this.Onmake_nameChanging(value);
					this.SendPropertyChanging();
					this._make_name = value;
					this.SendPropertyChanged("make_name");
					this.Onmake_nameChanged();
				}
			}
		}
		
		[Column(Storage="_make_description", DbType="NVarChar(255)")]
		public string make_description
		{
			get
			{
				return this._make_description;
			}
			set
			{
				if ((this._make_description != value))
				{
					this.Onmake_descriptionChanging(value);
					this.SendPropertyChanging();
					this._make_description = value;
					this.SendPropertyChanged("make_description");
					this.Onmake_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_id", DbType="Int NOT NULL")]
		public int vehicle_id
		{
			get
			{
				return this._vehicle_id;
			}
			set
			{
				if ((this._vehicle_id != value))
				{
					if (this._wix_vehicle.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onvehicle_idChanging(value);
					this.SendPropertyChanging();
					this._vehicle_id = value;
					this.SendPropertyChanged("vehicle_id");
					this.Onvehicle_idChanged();
				}
			}
		}
		
		[Association(Name="WixMake_WixModel", Storage="_wix_models", ThisKey="make_id", OtherKey="make_id")]
		public EntitySet<WixModel> WixModels
		{
			get
			{
				return this._wix_models;
			}
			set
			{
				this._wix_models.Assign(value);
			}
		}
		
		[Association(Name="WixVehicle_WixMake", Storage="_wix_vehicle", ThisKey="vehicle_id", OtherKey="vehicle_id", IsForeignKey=true)]
		public WixVehicle WixVehicle
		{
			get
			{
				return this._wix_vehicle.Entity;
			}
			set
			{
				WixVehicle previousValue = this._wix_vehicle.Entity;
				if (((previousValue != value) 
							|| (this._wix_vehicle.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_vehicle.Entity = null;
						previousValue.WixMakes.Remove(this);
					}
					this._wix_vehicle.Entity = value;
					if ((value != null))
					{
						value.WixMakes.Add(this);
						this._vehicle_id = value.vehicle_id;
					}
					else
					{
						this._vehicle_id = default(int);
					}
					this.SendPropertyChanged("WixVehicle");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_models(WixModel entity)
		{
			this.SendPropertyChanging();
			entity.WixMake = this;
		}
		
		private void detach_wix_models(WixModel entity)
		{
			this.SendPropertyChanging();
			entity.WixMake = null;
		}
	}
	
	[Table(Name="dbo.wix_models")]
	public partial class WixModel : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _model_id;
		
		private System.DateTime _model_created;
		
		private System.DateTime _model_modified;
		
		private string _model_name;
		
		private string _model_description;
		
		private System.Nullable<int> _model_year_from;
		
		private System.Nullable<int> _model_year_to;
		
		private int _make_id;
		
		private EntitySet<WixEngineModel> _wix_engine_models;
		
		private EntitySet<WixFilterEngine> _WixFilterEngines;
		
		private EntityRef<WixMake> _wix_make;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onmodel_idChanging(int value);
    partial void Onmodel_idChanged();
    partial void Onmodel_createdChanging(System.DateTime value);
    partial void Onmodel_createdChanged();
    partial void Onmodel_modifiedChanging(System.DateTime value);
    partial void Onmodel_modifiedChanged();
    partial void Onmodel_nameChanging(string value);
    partial void Onmodel_nameChanged();
    partial void Onmodel_descriptionChanging(string value);
    partial void Onmodel_descriptionChanged();
    partial void Onmodel_year_fromChanging(System.Nullable<int> value);
    partial void Onmodel_year_fromChanged();
    partial void Onmodel_year_toChanging(System.Nullable<int> value);
    partial void Onmodel_year_toChanged();
    partial void Onmake_idChanging(int value);
    partial void Onmake_idChanged();
    #endregion
		
		public WixModel()
		{
			this._wix_engine_models = new EntitySet<WixEngineModel>(new Action<WixEngineModel>(this.attach_wix_engine_models), new Action<WixEngineModel>(this.detach_wix_engine_models));
			this._WixFilterEngines = new EntitySet<WixFilterEngine>(new Action<WixFilterEngine>(this.attach_WixFilterEngines), new Action<WixFilterEngine>(this.detach_WixFilterEngines));
			this._wix_make = default(EntityRef<WixMake>);
			OnCreated();
		}
		
		[Column(Storage="_model_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_created", DbType="DateTime NOT NULL")]
		public System.DateTime model_created
		{
			get
			{
				return this._model_created;
			}
			set
			{
				if ((this._model_created != value))
				{
					this.Onmodel_createdChanging(value);
					this.SendPropertyChanging();
					this._model_created = value;
					this.SendPropertyChanged("model_created");
					this.Onmodel_createdChanged();
				}
			}
		}
		
		[Column(Storage="_model_modified", DbType="DateTime NOT NULL")]
		public System.DateTime model_modified
		{
			get
			{
				return this._model_modified;
			}
			set
			{
				if ((this._model_modified != value))
				{
					this.Onmodel_modifiedChanging(value);
					this.SendPropertyChanging();
					this._model_modified = value;
					this.SendPropertyChanged("model_modified");
					this.Onmodel_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_model_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string model_name
		{
			get
			{
				return this._model_name;
			}
			set
			{
				if ((this._model_name != value))
				{
					this.Onmodel_nameChanging(value);
					this.SendPropertyChanging();
					this._model_name = value;
					this.SendPropertyChanged("model_name");
					this.Onmodel_nameChanged();
				}
			}
		}
		
		[Column(Storage="_model_description", DbType="NVarChar(255)")]
		public string model_description
		{
			get
			{
				return this._model_description;
			}
			set
			{
				if ((this._model_description != value))
				{
					this.Onmodel_descriptionChanging(value);
					this.SendPropertyChanging();
					this._model_description = value;
					this.SendPropertyChanged("model_description");
					this.Onmodel_descriptionChanged();
				}
			}
		}
		
		[Column(Storage="_model_year_from", DbType="Int")]
		public System.Nullable<int> model_year_from
		{
			get
			{
				return this._model_year_from;
			}
			set
			{
				if ((this._model_year_from != value))
				{
					this.Onmodel_year_fromChanging(value);
					this.SendPropertyChanging();
					this._model_year_from = value;
					this.SendPropertyChanged("model_year_from");
					this.Onmodel_year_fromChanged();
				}
			}
		}
		
		[Column(Storage="_model_year_to", DbType="Int")]
		public System.Nullable<int> model_year_to
		{
			get
			{
				return this._model_year_to;
			}
			set
			{
				if ((this._model_year_to != value))
				{
					this.Onmodel_year_toChanging(value);
					this.SendPropertyChanging();
					this._model_year_to = value;
					this.SendPropertyChanged("model_year_to");
					this.Onmodel_year_toChanged();
				}
			}
		}
		
		[Column(Storage="_make_id", DbType="Int NOT NULL")]
		public int make_id
		{
			get
			{
				return this._make_id;
			}
			set
			{
				if ((this._make_id != value))
				{
					if (this._wix_make.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmake_idChanging(value);
					this.SendPropertyChanging();
					this._make_id = value;
					this.SendPropertyChanged("make_id");
					this.Onmake_idChanged();
				}
			}
		}
		
		[Association(Name="WixModel_WixEngineModel", Storage="_wix_engine_models", ThisKey="model_id", OtherKey="model_id")]
		public EntitySet<WixEngineModel> WixEngineModels
		{
			get
			{
				return this._wix_engine_models;
			}
			set
			{
				this._wix_engine_models.Assign(value);
			}
		}
		
		[Association(Name="WixModel_WixFilterEngine", Storage="_WixFilterEngines", ThisKey="model_id", OtherKey="model_id")]
		public EntitySet<WixFilterEngine> WixFilterEngines
		{
			get
			{
				return this._WixFilterEngines;
			}
			set
			{
				this._WixFilterEngines.Assign(value);
			}
		}
		
		[Association(Name="WixMake_WixModel", Storage="_wix_make", ThisKey="make_id", OtherKey="make_id", IsForeignKey=true)]
		public WixMake WixMake
		{
			get
			{
				return this._wix_make.Entity;
			}
			set
			{
				WixMake previousValue = this._wix_make.Entity;
				if (((previousValue != value) 
							|| (this._wix_make.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_make.Entity = null;
						previousValue.WixModels.Remove(this);
					}
					this._wix_make.Entity = value;
					if ((value != null))
					{
						value.WixModels.Add(this);
						this._make_id = value.make_id;
					}
					else
					{
						this._make_id = default(int);
					}
					this.SendPropertyChanged("WixMake");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_engine_models(WixEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.WixModel = this;
		}
		
		private void detach_wix_engine_models(WixEngineModel entity)
		{
			this.SendPropertyChanging();
			entity.WixModel = null;
		}
		
		private void attach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixModel = this;
		}
		
		private void detach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixModel = null;
		}
	}
	
	[Table(Name="dbo.wix_vehicles")]
	public partial class WixVehicle : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _vehicle_id;
		
		private System.DateTime _vehicle_created;
		
		private System.DateTime _vehicle_modified;
		
		private string _vehicle_name;
		
		private string _vehicle_description;
		
		private EntitySet<WixMake> _wix_makes;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onvehicle_idChanging(int value);
    partial void Onvehicle_idChanged();
    partial void Onvehicle_createdChanging(System.DateTime value);
    partial void Onvehicle_createdChanged();
    partial void Onvehicle_modifiedChanging(System.DateTime value);
    partial void Onvehicle_modifiedChanged();
    partial void Onvehicle_nameChanging(string value);
    partial void Onvehicle_nameChanged();
    partial void Onvehicle_descriptionChanging(string value);
    partial void Onvehicle_descriptionChanged();
    #endregion
		
		public WixVehicle()
		{
			this._wix_makes = new EntitySet<WixMake>(new Action<WixMake>(this.attach_wix_makes), new Action<WixMake>(this.detach_wix_makes));
			OnCreated();
		}
		
		[Column(Storage="_vehicle_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int vehicle_id
		{
			get
			{
				return this._vehicle_id;
			}
			set
			{
				if ((this._vehicle_id != value))
				{
					this.Onvehicle_idChanging(value);
					this.SendPropertyChanging();
					this._vehicle_id = value;
					this.SendPropertyChanged("vehicle_id");
					this.Onvehicle_idChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_created", DbType="DateTime NOT NULL")]
		public System.DateTime vehicle_created
		{
			get
			{
				return this._vehicle_created;
			}
			set
			{
				if ((this._vehicle_created != value))
				{
					this.Onvehicle_createdChanging(value);
					this.SendPropertyChanging();
					this._vehicle_created = value;
					this.SendPropertyChanged("vehicle_created");
					this.Onvehicle_createdChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_modified", DbType="DateTime NOT NULL")]
		public System.DateTime vehicle_modified
		{
			get
			{
				return this._vehicle_modified;
			}
			set
			{
				if ((this._vehicle_modified != value))
				{
					this.Onvehicle_modifiedChanging(value);
					this.SendPropertyChanging();
					this._vehicle_modified = value;
					this.SendPropertyChanged("vehicle_modified");
					this.Onvehicle_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string vehicle_name
		{
			get
			{
				return this._vehicle_name;
			}
			set
			{
				if ((this._vehicle_name != value))
				{
					this.Onvehicle_nameChanging(value);
					this.SendPropertyChanging();
					this._vehicle_name = value;
					this.SendPropertyChanged("vehicle_name");
					this.Onvehicle_nameChanged();
				}
			}
		}
		
		[Column(Storage="_vehicle_description", DbType="NVarChar(255)")]
		public string vehicle_description
		{
			get
			{
				return this._vehicle_description;
			}
			set
			{
				if ((this._vehicle_description != value))
				{
					this.Onvehicle_descriptionChanging(value);
					this.SendPropertyChanging();
					this._vehicle_description = value;
					this.SendPropertyChanged("vehicle_description");
					this.Onvehicle_descriptionChanged();
				}
			}
		}
		
		[Association(Name="WixVehicle_WixMake", Storage="_wix_makes", ThisKey="vehicle_id", OtherKey="vehicle_id")]
		public EntitySet<WixMake> WixMakes
		{
			get
			{
				return this._wix_makes;
			}
			set
			{
				this._wix_makes.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_makes(WixMake entity)
		{
			this.SendPropertyChanging();
			entity.WixVehicle = this;
		}
		
		private void detach_wix_makes(WixMake entity)
		{
			this.SendPropertyChanging();
			entity.WixVehicle = null;
		}
	}
	
	[Table(Name="dbo.wix_filtron_cross")]
	public partial class WixFiltronCross : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _cross_id;
		
		private System.DateTime _cross_created;
		
		private System.DateTime _cross_modified;
		
		private int _wix_filter_id;
		
		private int _filtron_filter_id;
		
		private string _wix_filter_number;
		
		private string _filtron_filter_number;
		
		private string _wix_filter_number_trim;
		
		private string _filtron_filter_number_trim;
		
		private EntityRef<WixFilter> _WixFilter;
		
		private EntityRef<FiltronFilter> _FiltronFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Oncross_idChanging(int value);
    partial void Oncross_idChanged();
    partial void Oncross_createdChanging(System.DateTime value);
    partial void Oncross_createdChanged();
    partial void Oncross_modifiedChanging(System.DateTime value);
    partial void Oncross_modifiedChanged();
    partial void Onwix_filter_idChanging(int value);
    partial void Onwix_filter_idChanged();
    partial void Onfiltron_filter_idChanging(int value);
    partial void Onfiltron_filter_idChanged();
    partial void Onwix_filter_numberChanging(string value);
    partial void Onwix_filter_numberChanged();
    partial void Onfiltron_filter_numberChanging(string value);
    partial void Onfiltron_filter_numberChanged();
    partial void Onwix_filter_number_trimChanging(string value);
    partial void Onwix_filter_number_trimChanged();
    partial void Onfiltron_filter_number_trimChanging(string value);
    partial void Onfiltron_filter_number_trimChanged();
    #endregion
		
		public WixFiltronCross()
		{
			this._WixFilter = default(EntityRef<WixFilter>);
			this._FiltronFilter = default(EntityRef<FiltronFilter>);
			OnCreated();
		}
		
		[Column(Storage="_cross_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int cross_id
		{
			get
			{
				return this._cross_id;
			}
			set
			{
				if ((this._cross_id != value))
				{
					this.Oncross_idChanging(value);
					this.SendPropertyChanging();
					this._cross_id = value;
					this.SendPropertyChanged("cross_id");
					this.Oncross_idChanged();
				}
			}
		}
		
		[Column(Storage="_cross_created", DbType="DateTime NOT NULL")]
		public System.DateTime cross_created
		{
			get
			{
				return this._cross_created;
			}
			set
			{
				if ((this._cross_created != value))
				{
					this.Oncross_createdChanging(value);
					this.SendPropertyChanging();
					this._cross_created = value;
					this.SendPropertyChanged("cross_created");
					this.Oncross_createdChanged();
				}
			}
		}
		
		[Column(Storage="_cross_modified", DbType="DateTime NOT NULL")]
		public System.DateTime cross_modified
		{
			get
			{
				return this._cross_modified;
			}
			set
			{
				if ((this._cross_modified != value))
				{
					this.Oncross_modifiedChanging(value);
					this.SendPropertyChanging();
					this._cross_modified = value;
					this.SendPropertyChanged("cross_modified");
					this.Oncross_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_wix_filter_id", DbType="Int NOT NULL")]
		public int wix_filter_id
		{
			get
			{
				return this._wix_filter_id;
			}
			set
			{
				if ((this._wix_filter_id != value))
				{
					if (this._WixFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onwix_filter_idChanging(value);
					this.SendPropertyChanging();
					this._wix_filter_id = value;
					this.SendPropertyChanged("wix_filter_id");
					this.Onwix_filter_idChanged();
				}
			}
		}
		
		[Column(Storage="_filtron_filter_id", DbType="Int NOT NULL")]
		public int filtron_filter_id
		{
			get
			{
				return this._filtron_filter_id;
			}
			set
			{
				if ((this._filtron_filter_id != value))
				{
					if (this._FiltronFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfiltron_filter_idChanging(value);
					this.SendPropertyChanging();
					this._filtron_filter_id = value;
					this.SendPropertyChanged("filtron_filter_id");
					this.Onfiltron_filter_idChanged();
				}
			}
		}
		
		[Column(Storage="_wix_filter_number", DbType="NVarChar(255)")]
		public string wix_filter_number
		{
			get
			{
				return this._wix_filter_number;
			}
			set
			{
				if ((this._wix_filter_number != value))
				{
					this.Onwix_filter_numberChanging(value);
					this.SendPropertyChanging();
					this._wix_filter_number = value;
					this.SendPropertyChanged("wix_filter_number");
					this.Onwix_filter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_filtron_filter_number", DbType="NVarChar(255)")]
		public string filtron_filter_number
		{
			get
			{
				return this._filtron_filter_number;
			}
			set
			{
				if ((this._filtron_filter_number != value))
				{
					this.Onfiltron_filter_numberChanging(value);
					this.SendPropertyChanging();
					this._filtron_filter_number = value;
					this.SendPropertyChanged("filtron_filter_number");
					this.Onfiltron_filter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_wix_filter_number_trim", DbType="NVarChar(255)")]
		public string wix_filter_number_trim
		{
			get
			{
				return this._wix_filter_number_trim;
			}
			set
			{
				if ((this._wix_filter_number_trim != value))
				{
					this.Onwix_filter_number_trimChanging(value);
					this.SendPropertyChanging();
					this._wix_filter_number_trim = value;
					this.SendPropertyChanged("wix_filter_number_trim");
					this.Onwix_filter_number_trimChanged();
				}
			}
		}
		
		[Column(Storage="_filtron_filter_number_trim", DbType="NVarChar(255)")]
		public string filtron_filter_number_trim
		{
			get
			{
				return this._filtron_filter_number_trim;
			}
			set
			{
				if ((this._filtron_filter_number_trim != value))
				{
					this.Onfiltron_filter_number_trimChanging(value);
					this.SendPropertyChanging();
					this._filtron_filter_number_trim = value;
					this.SendPropertyChanged("filtron_filter_number_trim");
					this.Onfiltron_filter_number_trimChanged();
				}
			}
		}
		
		[Association(Name="WixFilter_WixFiltronCross", Storage="_WixFilter", ThisKey="wix_filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public WixFilter WixFilter
		{
			get
			{
				return this._WixFilter.Entity;
			}
			set
			{
				WixFilter previousValue = this._WixFilter.Entity;
				if (((previousValue != value) 
							|| (this._WixFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilter.Entity = null;
						previousValue.WixFiltronCrosses.Remove(this);
					}
					this._WixFilter.Entity = value;
					if ((value != null))
					{
						value.WixFiltronCrosses.Add(this);
						this._wix_filter_id = value.filter_id;
					}
					else
					{
						this._wix_filter_id = default(int);
					}
					this.SendPropertyChanged("WixFilter");
				}
			}
		}
		
		[Association(Name="FiltronFilter_WixFiltronCross", Storage="_FiltronFilter", ThisKey="filtron_filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public FiltronFilter FiltronFilter
		{
			get
			{
				return this._FiltronFilter.Entity;
			}
			set
			{
				FiltronFilter previousValue = this._FiltronFilter.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilter.Entity = null;
						previousValue.WixFiltronCrosses.Remove(this);
					}
					this._FiltronFilter.Entity = value;
					if ((value != null))
					{
						value.WixFiltronCrosses.Add(this);
						this._filtron_filter_id = value.filter_id;
					}
					else
					{
						this._filtron_filter_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_filter_engines")]
	public partial class WixFilterEngine : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_engine_id;
		
		private System.DateTime _filter_engine_created;
		
		private System.DateTime _filter_engine_modified;
		
		private int _filter_id;
		
		private int _engine_id;
		
		private System.Nullable<int> _model_id;
		
		private string _filter_additional_info;
		
		private string _filter_other_info;
		
		private System.Nullable<int> _year_from;
		
		private System.Nullable<int> _year_to;
		
		private EntitySet<WixFilterEngineFootnote> _wix_filter_engine_footnotes;
		
		private EntitySet<WixFilterEngineComment> _wix_filter_engine_comments;
		
		private EntityRef<WixEngine> _WixEngine;
		
		private EntityRef<WixModel> _WixModel;
		
		private EntityRef<WixFilter> _WixFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_engine_idChanging(int value);
    partial void Onfilter_engine_idChanged();
    partial void Onfilter_engine_createdChanging(System.DateTime value);
    partial void Onfilter_engine_createdChanged();
    partial void Onfilter_engine_modifiedChanging(System.DateTime value);
    partial void Onfilter_engine_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onmodel_idChanging(System.Nullable<int> value);
    partial void Onmodel_idChanged();
    partial void Onfilter_additional_infoChanging(string value);
    partial void Onfilter_additional_infoChanged();
    partial void Onfilter_other_infoChanging(string value);
    partial void Onfilter_other_infoChanged();
    partial void Onyear_fromChanging(System.Nullable<int> value);
    partial void Onyear_fromChanged();
    partial void Onyear_toChanging(System.Nullable<int> value);
    partial void Onyear_toChanged();
    #endregion
		
		public WixFilterEngine()
		{
			this._wix_filter_engine_footnotes = new EntitySet<WixFilterEngineFootnote>(new Action<WixFilterEngineFootnote>(this.attach_wix_filter_engine_footnotes), new Action<WixFilterEngineFootnote>(this.detach_wix_filter_engine_footnotes));
			this._wix_filter_engine_comments = new EntitySet<WixFilterEngineComment>(new Action<WixFilterEngineComment>(this.attach_wix_filter_engine_comments), new Action<WixFilterEngineComment>(this.detach_wix_filter_engine_comments));
			this._WixEngine = default(EntityRef<WixEngine>);
			this._WixModel = default(EntityRef<WixModel>);
			this._WixFilter = default(EntityRef<WixFilter>);
			OnCreated();
		}
		
		[Column(Storage="_filter_engine_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_engine_id
		{
			get
			{
				return this._filter_engine_id;
			}
			set
			{
				if ((this._filter_engine_id != value))
				{
					this.Onfilter_engine_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_id = value;
					this.SendPropertyChanged("filter_engine_id");
					this.Onfilter_engine_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_created
		{
			get
			{
				return this._filter_engine_created;
			}
			set
			{
				if ((this._filter_engine_created != value))
				{
					this.Onfilter_engine_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_created = value;
					this.SendPropertyChanged("filter_engine_created");
					this.Onfilter_engine_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_modified
		{
			get
			{
				return this._filter_engine_modified;
			}
			set
			{
				if ((this._filter_engine_modified != value))
				{
					this.Onfilter_engine_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_modified = value;
					this.SendPropertyChanged("filter_engine_modified");
					this.Onfilter_engine_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._WixFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_id", DbType="Int NOT NULL")]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					if (this._WixEngine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_id", DbType="Int")]
		public System.Nullable<int> model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					if (this._WixModel.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_additional_info", DbType="NVarChar(500)")]
		public string filter_additional_info
		{
			get
			{
				return this._filter_additional_info;
			}
			set
			{
				if ((this._filter_additional_info != value))
				{
					this.Onfilter_additional_infoChanging(value);
					this.SendPropertyChanging();
					this._filter_additional_info = value;
					this.SendPropertyChanged("filter_additional_info");
					this.Onfilter_additional_infoChanged();
				}
			}
		}
		
		[Column(Storage="_filter_other_info", DbType="NVarChar(255)")]
		public string filter_other_info
		{
			get
			{
				return this._filter_other_info;
			}
			set
			{
				if ((this._filter_other_info != value))
				{
					this.Onfilter_other_infoChanging(value);
					this.SendPropertyChanging();
					this._filter_other_info = value;
					this.SendPropertyChanged("filter_other_info");
					this.Onfilter_other_infoChanged();
				}
			}
		}
		
		[Column(Storage="_year_from")]
		public System.Nullable<int> year_from
		{
			get
			{
				return this._year_from;
			}
			set
			{
				if ((this._year_from != value))
				{
					this.Onyear_fromChanging(value);
					this.SendPropertyChanging();
					this._year_from = value;
					this.SendPropertyChanged("year_from");
					this.Onyear_fromChanged();
				}
			}
		}
		
		[Column(Storage="_year_to")]
		public System.Nullable<int> year_to
		{
			get
			{
				return this._year_to;
			}
			set
			{
				if ((this._year_to != value))
				{
					this.Onyear_toChanging(value);
					this.SendPropertyChanging();
					this._year_to = value;
					this.SendPropertyChanged("year_to");
					this.Onyear_toChanged();
				}
			}
		}
		
		[Association(Name="WixFilterEngine_WixFilterEngineFootnote", Storage="_wix_filter_engine_footnotes", ThisKey="filter_engine_id", OtherKey="filter_engine_id")]
		public EntitySet<WixFilterEngineFootnote> WixFilterEngineFootnotes
		{
			get
			{
				return this._wix_filter_engine_footnotes;
			}
			set
			{
				this._wix_filter_engine_footnotes.Assign(value);
			}
		}
		
		[Association(Name="WixFilterEngine_WixFilterEngineComment", Storage="_wix_filter_engine_comments", ThisKey="filter_engine_id", OtherKey="filter_engine_id")]
		public EntitySet<WixFilterEngineComment> WixFilterEngineComments
		{
			get
			{
				return this._wix_filter_engine_comments;
			}
			set
			{
				this._wix_filter_engine_comments.Assign(value);
			}
		}
		
		[Association(Name="WixEngine_WixFilterEngine", Storage="_WixEngine", ThisKey="engine_id", OtherKey="engine_id", IsForeignKey=true)]
		public WixEngine WixEngine
		{
			get
			{
				return this._WixEngine.Entity;
			}
			set
			{
				WixEngine previousValue = this._WixEngine.Entity;
				if (((previousValue != value) 
							|| (this._WixEngine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixEngine.Entity = null;
						previousValue.WixFilterEngines.Remove(this);
					}
					this._WixEngine.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngines.Add(this);
						this._engine_id = value.engine_id;
					}
					else
					{
						this._engine_id = default(int);
					}
					this.SendPropertyChanged("WixEngine");
				}
			}
		}
		
		[Association(Name="WixModel_WixFilterEngine", Storage="_WixModel", ThisKey="model_id", OtherKey="model_id", IsForeignKey=true)]
		public WixModel WixModel
		{
			get
			{
				return this._WixModel.Entity;
			}
			set
			{
				WixModel previousValue = this._WixModel.Entity;
				if (((previousValue != value) 
							|| (this._WixModel.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixModel.Entity = null;
						previousValue.WixFilterEngines.Remove(this);
					}
					this._WixModel.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngines.Add(this);
						this._model_id = value.model_id;
					}
					else
					{
						this._model_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixModel");
				}
			}
		}
		
		[Association(Name="WixFilter_WixFilterEngine", Storage="_WixFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public WixFilter WixFilter
		{
			get
			{
				return this._WixFilter.Entity;
			}
			set
			{
				WixFilter previousValue = this._WixFilter.Entity;
				if (((previousValue != value) 
							|| (this._WixFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilter.Entity = null;
						previousValue.WixFilterEngines.Remove(this);
					}
					this._WixFilter.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngines.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("WixFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_filter_engine_footnotes(WixFilterEngineFootnote entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterEngine = this;
		}
		
		private void detach_wix_filter_engine_footnotes(WixFilterEngineFootnote entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterEngine = null;
		}
		
		private void attach_wix_filter_engine_comments(WixFilterEngineComment entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterEngine = this;
		}
		
		private void detach_wix_filter_engine_comments(WixFilterEngineComment entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterEngine = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_engines")]
	public partial class FiltronFilterEngine : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_engine_id;
		
		private System.DateTime _filter_engine_created;
		
		private System.DateTime _filter_engine_modified;
		
		private int _filter_id;
		
		private int _engine_id;
		
		private System.Nullable<int> _model_id;
		
		private string _filter_additional_info;
		
		private string _filter_other_info;
		
		private EntitySet<FiltronFilterEngineComment> _FiltronFilterEnigneComments;
		
		private EntityRef<FiltronEngine> _FiltronEngine;
		
		private EntityRef<FiltronModel> _FiltronModel;
		
		private EntityRef<FiltronFilter> _FiltronFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_engine_idChanging(int value);
    partial void Onfilter_engine_idChanged();
    partial void Onfilter_engine_createdChanging(System.DateTime value);
    partial void Onfilter_engine_createdChanged();
    partial void Onfilter_engine_modifiedChanging(System.DateTime value);
    partial void Onfilter_engine_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onengine_idChanging(int value);
    partial void Onengine_idChanged();
    partial void Onmodel_idChanging(System.Nullable<int> value);
    partial void Onmodel_idChanged();
    partial void Onfilter_additional_infoChanging(string value);
    partial void Onfilter_additional_infoChanged();
    partial void Onfilter_other_infoChanging(string value);
    partial void Onfilter_other_infoChanged();
    #endregion
		
		public FiltronFilterEngine()
		{
			this._FiltronFilterEnigneComments = new EntitySet<FiltronFilterEngineComment>(new Action<FiltronFilterEngineComment>(this.attach_FiltronFilterEnigneComments), new Action<FiltronFilterEngineComment>(this.detach_FiltronFilterEnigneComments));
			this._FiltronEngine = default(EntityRef<FiltronEngine>);
			this._FiltronModel = default(EntityRef<FiltronModel>);
			this._FiltronFilter = default(EntityRef<FiltronFilter>);
			OnCreated();
		}
		
		[Column(Storage="_filter_engine_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_engine_id
		{
			get
			{
				return this._filter_engine_id;
			}
			set
			{
				if ((this._filter_engine_id != value))
				{
					this.Onfilter_engine_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_id = value;
					this.SendPropertyChanged("filter_engine_id");
					this.Onfilter_engine_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_created
		{
			get
			{
				return this._filter_engine_created;
			}
			set
			{
				if ((this._filter_engine_created != value))
				{
					this.Onfilter_engine_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_created = value;
					this.SendPropertyChanged("filter_engine_created");
					this.Onfilter_engine_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_modified
		{
			get
			{
				return this._filter_engine_modified;
			}
			set
			{
				if ((this._filter_engine_modified != value))
				{
					this.Onfilter_engine_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_modified = value;
					this.SendPropertyChanged("filter_engine_modified");
					this.Onfilter_engine_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._FiltronFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_engine_id", DbType="Int NOT NULL")]
		public int engine_id
		{
			get
			{
				return this._engine_id;
			}
			set
			{
				if ((this._engine_id != value))
				{
					if (this._FiltronEngine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onengine_idChanging(value);
					this.SendPropertyChanging();
					this._engine_id = value;
					this.SendPropertyChanged("engine_id");
					this.Onengine_idChanged();
				}
			}
		}
		
		[Column(Storage="_model_id", DbType="Int")]
		public System.Nullable<int> model_id
		{
			get
			{
				return this._model_id;
			}
			set
			{
				if ((this._model_id != value))
				{
					if (this._FiltronModel.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmodel_idChanging(value);
					this.SendPropertyChanging();
					this._model_id = value;
					this.SendPropertyChanged("model_id");
					this.Onmodel_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_additional_info", CanBeNull=false)]
		public string filter_additional_info
		{
			get
			{
				return this._filter_additional_info;
			}
			set
			{
				if ((this._filter_additional_info != value))
				{
					this.Onfilter_additional_infoChanging(value);
					this.SendPropertyChanging();
					this._filter_additional_info = value;
					this.SendPropertyChanged("filter_additional_info");
					this.Onfilter_additional_infoChanged();
				}
			}
		}
		
		[Column(Storage="_filter_other_info", CanBeNull=false)]
		public string filter_other_info
		{
			get
			{
				return this._filter_other_info;
			}
			set
			{
				if ((this._filter_other_info != value))
				{
					this.Onfilter_other_infoChanging(value);
					this.SendPropertyChanging();
					this._filter_other_info = value;
					this.SendPropertyChanged("filter_other_info");
					this.Onfilter_other_infoChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterEngine_FiltronFilterEngineComment", Storage="_FiltronFilterEnigneComments", ThisKey="filter_engine_id", OtherKey="filter_engine_id")]
		public EntitySet<FiltronFilterEngineComment> FiltronFilterEngineComments
		{
			get
			{
				return this._FiltronFilterEnigneComments;
			}
			set
			{
				this._FiltronFilterEnigneComments.Assign(value);
			}
		}
		
		[Association(Name="FiltronEngine_FiltronFilterEngine", Storage="_FiltronEngine", ThisKey="engine_id", OtherKey="engine_id", IsForeignKey=true)]
		public FiltronEngine FiltronEngine
		{
			get
			{
				return this._FiltronEngine.Entity;
			}
			set
			{
				FiltronEngine previousValue = this._FiltronEngine.Entity;
				if (((previousValue != value) 
							|| (this._FiltronEngine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronEngine.Entity = null;
						previousValue.FiltronFilterEngines.Remove(this);
					}
					this._FiltronEngine.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterEngines.Add(this);
						this._engine_id = value.engine_id;
					}
					else
					{
						this._engine_id = default(int);
					}
					this.SendPropertyChanged("FiltronEngine");
				}
			}
		}
		
		[Association(Name="FiltronModel_FiltronFilterEngine", Storage="_FiltronModel", ThisKey="model_id", OtherKey="model_id", IsForeignKey=true)]
		public FiltronModel FiltronModel
		{
			get
			{
				return this._FiltronModel.Entity;
			}
			set
			{
				FiltronModel previousValue = this._FiltronModel.Entity;
				if (((previousValue != value) 
							|| (this._FiltronModel.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronModel.Entity = null;
						previousValue.FiltronFilterEngines.Remove(this);
					}
					this._FiltronModel.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterEngines.Add(this);
						this._model_id = value.model_id;
					}
					else
					{
						this._model_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("FiltronModel");
				}
			}
		}
		
		[Association(Name="FiltronFilter_FiltronFilterEngine", Storage="_FiltronFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public FiltronFilter FiltronFilter
		{
			get
			{
				return this._FiltronFilter.Entity;
			}
			set
			{
				FiltronFilter previousValue = this._FiltronFilter.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilter.Entity = null;
						previousValue.FiltronFilterEngines.Remove(this);
					}
					this._FiltronFilter.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterEngines.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_FiltronFilterEnigneComments(FiltronFilterEngineComment entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterEngine = this;
		}
		
		private void detach_FiltronFilterEnigneComments(FiltronFilterEngineComment entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilterEngine = null;
		}
	}
	
	[Table(Name="dbo.wix_filters")]
	public partial class WixFilter : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_id;
		
		private System.DateTime _filter_created;
		
		private System.DateTime _filter_modified;
		
		private string _filter_number;
		
		private string _filter_number_trim;
		
		private System.Nullable<int> _filter_type_id;
		
		private System.Nullable<int> _filter_media_id;
		
		private System.Nullable<int> _filter_style_id;
		
		private System.Nullable<int> _filter_shape_id;
		
		private decimal _filter_height;
		
		private decimal _filter_width;
		
		private decimal _filter_length;
		
		private decimal _filter_outside_dia_top;
		
		private decimal _filter_outside_dia_bottom;
		
		private decimal _filter_inside_dia_top;
		
		private decimal _filter_inside_dia_bottom;
		
		private System.Nullable<int> _filter_cubic_feet_per_minute;
		
		private System.Nullable<int> _filter_micron;
		
		private string _filter_threads;
		
		private string _filter_thread_size;
		
		private string _filter_ends;
		
		private System.Nullable<bool> _filter_drains;
		
		private System.Nullable<bool> _filter_fins;
		
		private System.Nullable<bool> _filter_oval_shaped;
		
		private string _filter_inlet;
		
		private string _filter_outlet;
		
		private string _filter_vapor;
		
		private string _filter_bpvs;
		
		private System.Nullable<bool> _filter_adbv;
		
		private System.Nullable<bool> _filter_pressure_release;
		
		private System.Nullable<bool> _filter_stand_pipe;
		
		private System.Nullable<bool> _filter_anti_siphon_valve;
		
		private string _filter_beta_ratio;
		
		private string _filter_tube_layout;
		
		private System.Nullable<int> _filter_burst_pressure;
		
		private string _filter_flow_rate;
		
		private string _filter_principle_applications;
		
		private string _filter_image;
		
		private System.Nullable<int> _filter_service_id;
		
		private EntitySet<WixInterchange> _WixInterchanges;
		
		private EntitySet<WixFiltronCross> _WixFiltronCrosses;
		
		private EntitySet<WixFilterEngine> _WixFilterEngines;
		
		private EntitySet<WixLogisticsInfo> _WixLogisticsInfos;
		
		private EntityRef<WixFilterType> _WixFilterType;
		
		private EntityRef<WixFilterMedia> _WixFilterMedia;
		
		private EntityRef<WixFilterStyle> _WixFilterStyle;
		
		private EntityRef<WixFilterShape> _WixFilterShape;
		
		private EntityRef<WixFilterService> _WixFilterService;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onfilter_createdChanging(System.DateTime value);
    partial void Onfilter_createdChanged();
    partial void Onfilter_modifiedChanging(System.DateTime value);
    partial void Onfilter_modifiedChanged();
    partial void Onfilter_numberChanging(string value);
    partial void Onfilter_numberChanged();
    partial void Onfilter_number_trimChanging(string value);
    partial void Onfilter_number_trimChanged();
    partial void Onfilter_type_idChanging(System.Nullable<int> value);
    partial void Onfilter_type_idChanged();
    partial void Onfilter_media_idChanging(System.Nullable<int> value);
    partial void Onfilter_media_idChanged();
    partial void Onfilter_style_idChanging(System.Nullable<int> value);
    partial void Onfilter_style_idChanged();
    partial void Onfilter_shape_idChanging(System.Nullable<int> value);
    partial void Onfilter_shape_idChanged();
    partial void Onfilter_heightChanging(decimal value);
    partial void Onfilter_heightChanged();
    partial void Onfilter_widthChanging(decimal value);
    partial void Onfilter_widthChanged();
    partial void Onfilter_lengthChanging(decimal value);
    partial void Onfilter_lengthChanged();
    partial void Onfilter_outside_dia_topChanging(decimal value);
    partial void Onfilter_outside_dia_topChanged();
    partial void Onfilter_outside_dia_bottomChanging(decimal value);
    partial void Onfilter_outside_dia_bottomChanged();
    partial void Onfilter_inside_dia_topChanging(decimal value);
    partial void Onfilter_inside_dia_topChanged();
    partial void Onfilter_inside_dia_bottomChanging(decimal value);
    partial void Onfilter_inside_dia_bottomChanged();
    partial void Onfilter_cubic_feet_per_minuteChanging(System.Nullable<int> value);
    partial void Onfilter_cubic_feet_per_minuteChanged();
    partial void Onfilter_micronChanging(System.Nullable<int> value);
    partial void Onfilter_micronChanged();
    partial void Onfilter_threadsChanging(string value);
    partial void Onfilter_threadsChanged();
    partial void Onfilter_thread_sizeChanging(string value);
    partial void Onfilter_thread_sizeChanged();
    partial void Onfilter_endsChanging(string value);
    partial void Onfilter_endsChanged();
    partial void Onfilter_drainsChanging(System.Nullable<bool> value);
    partial void Onfilter_drainsChanged();
    partial void Onfilter_finsChanging(System.Nullable<bool> value);
    partial void Onfilter_finsChanged();
    partial void Onfilter_oval_shapedChanging(System.Nullable<bool> value);
    partial void Onfilter_oval_shapedChanged();
    partial void Onfilter_inletChanging(string value);
    partial void Onfilter_inletChanged();
    partial void Onfilter_outletChanging(string value);
    partial void Onfilter_outletChanged();
    partial void Onfilter_vaporChanging(string value);
    partial void Onfilter_vaporChanged();
    partial void Onfilter_bpvsChanging(string value);
    partial void Onfilter_bpvsChanged();
    partial void Onfilter_adbvChanging(System.Nullable<bool> value);
    partial void Onfilter_adbvChanged();
    partial void Onfilter_pressure_releaseChanging(System.Nullable<bool> value);
    partial void Onfilter_pressure_releaseChanged();
    partial void Onfilter_stand_pipeChanging(System.Nullable<bool> value);
    partial void Onfilter_stand_pipeChanged();
    partial void Onfilter_anti_siphon_valveChanging(System.Nullable<bool> value);
    partial void Onfilter_anti_siphon_valveChanged();
    partial void Onfilter_beta_ratioChanging(string value);
    partial void Onfilter_beta_ratioChanged();
    partial void Onfilter_tube_layoutChanging(string value);
    partial void Onfilter_tube_layoutChanged();
    partial void Onfilter_burst_pressureChanging(System.Nullable<int> value);
    partial void Onfilter_burst_pressureChanged();
    partial void Onfilter_flow_rateChanging(string value);
    partial void Onfilter_flow_rateChanged();
    partial void Onfilter_principle_applicationsChanging(string value);
    partial void Onfilter_principle_applicationsChanged();
    partial void Onfilter_imageChanging(string value);
    partial void Onfilter_imageChanged();
    partial void Onfilter_service_idChanging(System.Nullable<int> value);
    partial void Onfilter_service_idChanged();
    #endregion
		
		public WixFilter()
		{
			this._WixInterchanges = new EntitySet<WixInterchange>(new Action<WixInterchange>(this.attach_WixInterchanges), new Action<WixInterchange>(this.detach_WixInterchanges));
			this._WixFiltronCrosses = new EntitySet<WixFiltronCross>(new Action<WixFiltronCross>(this.attach_WixFiltronCrosses), new Action<WixFiltronCross>(this.detach_WixFiltronCrosses));
			this._WixFilterEngines = new EntitySet<WixFilterEngine>(new Action<WixFilterEngine>(this.attach_WixFilterEngines), new Action<WixFilterEngine>(this.detach_WixFilterEngines));
			this._WixLogisticsInfos = new EntitySet<WixLogisticsInfo>(new Action<WixLogisticsInfo>(this.attach_WixLogisticsInfos), new Action<WixLogisticsInfo>(this.detach_WixLogisticsInfos));
			this._WixFilterType = default(EntityRef<WixFilterType>);
			this._WixFilterMedia = default(EntityRef<WixFilterMedia>);
			this._WixFilterStyle = default(EntityRef<WixFilterStyle>);
			this._WixFilterShape = default(EntityRef<WixFilterShape>);
			this._WixFilterService = default(EntityRef<WixFilterService>);
			OnCreated();
		}
		
		[Column(Storage="_filter_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_created
		{
			get
			{
				return this._filter_created;
			}
			set
			{
				if ((this._filter_created != value))
				{
					this.Onfilter_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_created = value;
					this.SendPropertyChanged("filter_created");
					this.Onfilter_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_modified
		{
			get
			{
				return this._filter_modified;
			}
			set
			{
				if ((this._filter_modified != value))
				{
					this.Onfilter_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_modified = value;
					this.SendPropertyChanged("filter_modified");
					this.Onfilter_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_number", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string filter_number
		{
			get
			{
				return this._filter_number;
			}
			set
			{
				if ((this._filter_number != value))
				{
					this.Onfilter_numberChanging(value);
					this.SendPropertyChanging();
					this._filter_number = value;
					this.SendPropertyChanged("filter_number");
					this.Onfilter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_filter_number_trim", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string filter_number_trim
		{
			get
			{
				return this._filter_number_trim;
			}
			set
			{
				if ((this._filter_number_trim != value))
				{
					this.Onfilter_number_trimChanging(value);
					this.SendPropertyChanging();
					this._filter_number_trim = value;
					this.SendPropertyChanged("filter_number_trim");
					this.Onfilter_number_trimChanged();
				}
			}
		}
		
		[Column(Storage="_filter_type_id", DbType="Int")]
		public System.Nullable<int> filter_type_id
		{
			get
			{
				return this._filter_type_id;
			}
			set
			{
				if ((this._filter_type_id != value))
				{
					if (this._WixFilterType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_type_idChanging(value);
					this.SendPropertyChanging();
					this._filter_type_id = value;
					this.SendPropertyChanged("filter_type_id");
					this.Onfilter_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_media_id", DbType="Int")]
		public System.Nullable<int> filter_media_id
		{
			get
			{
				return this._filter_media_id;
			}
			set
			{
				if ((this._filter_media_id != value))
				{
					if (this._WixFilterMedia.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_media_idChanging(value);
					this.SendPropertyChanging();
					this._filter_media_id = value;
					this.SendPropertyChanged("filter_media_id");
					this.Onfilter_media_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_style_id", DbType="Int")]
		public System.Nullable<int> filter_style_id
		{
			get
			{
				return this._filter_style_id;
			}
			set
			{
				if ((this._filter_style_id != value))
				{
					if (this._WixFilterStyle.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_style_idChanging(value);
					this.SendPropertyChanging();
					this._filter_style_id = value;
					this.SendPropertyChanged("filter_style_id");
					this.Onfilter_style_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_shape_id", DbType="Int")]
		public System.Nullable<int> filter_shape_id
		{
			get
			{
				return this._filter_shape_id;
			}
			set
			{
				if ((this._filter_shape_id != value))
				{
					if (this._WixFilterShape.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_shape_idChanging(value);
					this.SendPropertyChanging();
					this._filter_shape_id = value;
					this.SendPropertyChanged("filter_shape_id");
					this.Onfilter_shape_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_height", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_height
		{
			get
			{
				return this._filter_height;
			}
			set
			{
				if ((this._filter_height != value))
				{
					this.Onfilter_heightChanging(value);
					this.SendPropertyChanging();
					this._filter_height = value;
					this.SendPropertyChanged("filter_height");
					this.Onfilter_heightChanged();
				}
			}
		}
		
		[Column(Storage="_filter_width", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_width
		{
			get
			{
				return this._filter_width;
			}
			set
			{
				if ((this._filter_width != value))
				{
					this.Onfilter_widthChanging(value);
					this.SendPropertyChanging();
					this._filter_width = value;
					this.SendPropertyChanged("filter_width");
					this.Onfilter_widthChanged();
				}
			}
		}
		
		[Column(Storage="_filter_length", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_length
		{
			get
			{
				return this._filter_length;
			}
			set
			{
				if ((this._filter_length != value))
				{
					this.Onfilter_lengthChanging(value);
					this.SendPropertyChanging();
					this._filter_length = value;
					this.SendPropertyChanged("filter_length");
					this.Onfilter_lengthChanged();
				}
			}
		}
		
		[Column(Storage="_filter_outside_dia_top", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_outside_dia_top
		{
			get
			{
				return this._filter_outside_dia_top;
			}
			set
			{
				if ((this._filter_outside_dia_top != value))
				{
					this.Onfilter_outside_dia_topChanging(value);
					this.SendPropertyChanging();
					this._filter_outside_dia_top = value;
					this.SendPropertyChanged("filter_outside_dia_top");
					this.Onfilter_outside_dia_topChanged();
				}
			}
		}
		
		[Column(Storage="_filter_outside_dia_bottom", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_outside_dia_bottom
		{
			get
			{
				return this._filter_outside_dia_bottom;
			}
			set
			{
				if ((this._filter_outside_dia_bottom != value))
				{
					this.Onfilter_outside_dia_bottomChanging(value);
					this.SendPropertyChanging();
					this._filter_outside_dia_bottom = value;
					this.SendPropertyChanged("filter_outside_dia_bottom");
					this.Onfilter_outside_dia_bottomChanged();
				}
			}
		}
		
		[Column(Storage="_filter_inside_dia_top", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_inside_dia_top
		{
			get
			{
				return this._filter_inside_dia_top;
			}
			set
			{
				if ((this._filter_inside_dia_top != value))
				{
					this.Onfilter_inside_dia_topChanging(value);
					this.SendPropertyChanging();
					this._filter_inside_dia_top = value;
					this.SendPropertyChanged("filter_inside_dia_top");
					this.Onfilter_inside_dia_topChanged();
				}
			}
		}
		
		[Column(Storage="_filter_inside_dia_bottom", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_inside_dia_bottom
		{
			get
			{
				return this._filter_inside_dia_bottom;
			}
			set
			{
				if ((this._filter_inside_dia_bottom != value))
				{
					this.Onfilter_inside_dia_bottomChanging(value);
					this.SendPropertyChanging();
					this._filter_inside_dia_bottom = value;
					this.SendPropertyChanged("filter_inside_dia_bottom");
					this.Onfilter_inside_dia_bottomChanged();
				}
			}
		}
		
		[Column(Storage="_filter_cubic_feet_per_minute", DbType="Int")]
		public System.Nullable<int> filter_cubic_feet_per_minute
		{
			get
			{
				return this._filter_cubic_feet_per_minute;
			}
			set
			{
				if ((this._filter_cubic_feet_per_minute != value))
				{
					this.Onfilter_cubic_feet_per_minuteChanging(value);
					this.SendPropertyChanging();
					this._filter_cubic_feet_per_minute = value;
					this.SendPropertyChanged("filter_cubic_feet_per_minute");
					this.Onfilter_cubic_feet_per_minuteChanged();
				}
			}
		}
		
		[Column(Storage="_filter_micron", DbType="Int")]
		public System.Nullable<int> filter_micron
		{
			get
			{
				return this._filter_micron;
			}
			set
			{
				if ((this._filter_micron != value))
				{
					this.Onfilter_micronChanging(value);
					this.SendPropertyChanging();
					this._filter_micron = value;
					this.SendPropertyChanged("filter_micron");
					this.Onfilter_micronChanged();
				}
			}
		}
		
		[Column(Storage="_filter_threads", DbType="NVarChar(80)")]
		public string filter_threads
		{
			get
			{
				return this._filter_threads;
			}
			set
			{
				if ((this._filter_threads != value))
				{
					this.Onfilter_threadsChanging(value);
					this.SendPropertyChanging();
					this._filter_threads = value;
					this.SendPropertyChanged("filter_threads");
					this.Onfilter_threadsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_thread_size", DbType="NVarChar(80)")]
		public string filter_thread_size
		{
			get
			{
				return this._filter_thread_size;
			}
			set
			{
				if ((this._filter_thread_size != value))
				{
					this.Onfilter_thread_sizeChanging(value);
					this.SendPropertyChanging();
					this._filter_thread_size = value;
					this.SendPropertyChanged("filter_thread_size");
					this.Onfilter_thread_sizeChanged();
				}
			}
		}
		
		[Column(Storage="_filter_ends", DbType="NVarChar(80)")]
		public string filter_ends
		{
			get
			{
				return this._filter_ends;
			}
			set
			{
				if ((this._filter_ends != value))
				{
					this.Onfilter_endsChanging(value);
					this.SendPropertyChanging();
					this._filter_ends = value;
					this.SendPropertyChanged("filter_ends");
					this.Onfilter_endsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_drains", DbType="Bit")]
		public System.Nullable<bool> filter_drains
		{
			get
			{
				return this._filter_drains;
			}
			set
			{
				if ((this._filter_drains != value))
				{
					this.Onfilter_drainsChanging(value);
					this.SendPropertyChanging();
					this._filter_drains = value;
					this.SendPropertyChanged("filter_drains");
					this.Onfilter_drainsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_fins", DbType="Bit")]
		public System.Nullable<bool> filter_fins
		{
			get
			{
				return this._filter_fins;
			}
			set
			{
				if ((this._filter_fins != value))
				{
					this.Onfilter_finsChanging(value);
					this.SendPropertyChanging();
					this._filter_fins = value;
					this.SendPropertyChanged("filter_fins");
					this.Onfilter_finsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_oval_shaped", DbType="Bit")]
		public System.Nullable<bool> filter_oval_shaped
		{
			get
			{
				return this._filter_oval_shaped;
			}
			set
			{
				if ((this._filter_oval_shaped != value))
				{
					this.Onfilter_oval_shapedChanging(value);
					this.SendPropertyChanging();
					this._filter_oval_shaped = value;
					this.SendPropertyChanged("filter_oval_shaped");
					this.Onfilter_oval_shapedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_inlet", DbType="NVarChar(80)")]
		public string filter_inlet
		{
			get
			{
				return this._filter_inlet;
			}
			set
			{
				if ((this._filter_inlet != value))
				{
					this.Onfilter_inletChanging(value);
					this.SendPropertyChanging();
					this._filter_inlet = value;
					this.SendPropertyChanged("filter_inlet");
					this.Onfilter_inletChanged();
				}
			}
		}
		
		[Column(Storage="_filter_outlet", DbType="NVarChar(80)")]
		public string filter_outlet
		{
			get
			{
				return this._filter_outlet;
			}
			set
			{
				if ((this._filter_outlet != value))
				{
					this.Onfilter_outletChanging(value);
					this.SendPropertyChanging();
					this._filter_outlet = value;
					this.SendPropertyChanged("filter_outlet");
					this.Onfilter_outletChanged();
				}
			}
		}
		
		[Column(Storage="_filter_vapor", DbType="NVarChar(80)")]
		public string filter_vapor
		{
			get
			{
				return this._filter_vapor;
			}
			set
			{
				if ((this._filter_vapor != value))
				{
					this.Onfilter_vaporChanging(value);
					this.SendPropertyChanging();
					this._filter_vapor = value;
					this.SendPropertyChanged("filter_vapor");
					this.Onfilter_vaporChanged();
				}
			}
		}
		
		[Column(Storage="_filter_bpvs", DbType="NVarChar(80)")]
		public string filter_bpvs
		{
			get
			{
				return this._filter_bpvs;
			}
			set
			{
				if ((this._filter_bpvs != value))
				{
					this.Onfilter_bpvsChanging(value);
					this.SendPropertyChanging();
					this._filter_bpvs = value;
					this.SendPropertyChanged("filter_bpvs");
					this.Onfilter_bpvsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_adbv", DbType="Bit")]
		public System.Nullable<bool> filter_adbv
		{
			get
			{
				return this._filter_adbv;
			}
			set
			{
				if ((this._filter_adbv != value))
				{
					this.Onfilter_adbvChanging(value);
					this.SendPropertyChanging();
					this._filter_adbv = value;
					this.SendPropertyChanged("filter_adbv");
					this.Onfilter_adbvChanged();
				}
			}
		}
		
		[Column(Storage="_filter_pressure_release", DbType="Bit")]
		public System.Nullable<bool> filter_pressure_release
		{
			get
			{
				return this._filter_pressure_release;
			}
			set
			{
				if ((this._filter_pressure_release != value))
				{
					this.Onfilter_pressure_releaseChanging(value);
					this.SendPropertyChanging();
					this._filter_pressure_release = value;
					this.SendPropertyChanged("filter_pressure_release");
					this.Onfilter_pressure_releaseChanged();
				}
			}
		}
		
		[Column(Storage="_filter_stand_pipe", DbType="Bit")]
		public System.Nullable<bool> filter_stand_pipe
		{
			get
			{
				return this._filter_stand_pipe;
			}
			set
			{
				if ((this._filter_stand_pipe != value))
				{
					this.Onfilter_stand_pipeChanging(value);
					this.SendPropertyChanging();
					this._filter_stand_pipe = value;
					this.SendPropertyChanged("filter_stand_pipe");
					this.Onfilter_stand_pipeChanged();
				}
			}
		}
		
		[Column(Storage="_filter_anti_siphon_valve", DbType="Bit")]
		public System.Nullable<bool> filter_anti_siphon_valve
		{
			get
			{
				return this._filter_anti_siphon_valve;
			}
			set
			{
				if ((this._filter_anti_siphon_valve != value))
				{
					this.Onfilter_anti_siphon_valveChanging(value);
					this.SendPropertyChanging();
					this._filter_anti_siphon_valve = value;
					this.SendPropertyChanged("filter_anti_siphon_valve");
					this.Onfilter_anti_siphon_valveChanged();
				}
			}
		}
		
		[Column(Storage="_filter_beta_ratio", DbType="NVarChar(80)")]
		public string filter_beta_ratio
		{
			get
			{
				return this._filter_beta_ratio;
			}
			set
			{
				if ((this._filter_beta_ratio != value))
				{
					this.Onfilter_beta_ratioChanging(value);
					this.SendPropertyChanging();
					this._filter_beta_ratio = value;
					this.SendPropertyChanged("filter_beta_ratio");
					this.Onfilter_beta_ratioChanged();
				}
			}
		}
		
		[Column(Storage="_filter_tube_layout", DbType="NVarChar(80)")]
		public string filter_tube_layout
		{
			get
			{
				return this._filter_tube_layout;
			}
			set
			{
				if ((this._filter_tube_layout != value))
				{
					this.Onfilter_tube_layoutChanging(value);
					this.SendPropertyChanging();
					this._filter_tube_layout = value;
					this.SendPropertyChanged("filter_tube_layout");
					this.Onfilter_tube_layoutChanged();
				}
			}
		}
		
		[Column(Storage="_filter_burst_pressure", DbType="Int")]
		public System.Nullable<int> filter_burst_pressure
		{
			get
			{
				return this._filter_burst_pressure;
			}
			set
			{
				if ((this._filter_burst_pressure != value))
				{
					this.Onfilter_burst_pressureChanging(value);
					this.SendPropertyChanging();
					this._filter_burst_pressure = value;
					this.SendPropertyChanged("filter_burst_pressure");
					this.Onfilter_burst_pressureChanged();
				}
			}
		}
		
		[Column(Storage="_filter_flow_rate", DbType="NVarChar(80)")]
		public string filter_flow_rate
		{
			get
			{
				return this._filter_flow_rate;
			}
			set
			{
				if ((this._filter_flow_rate != value))
				{
					this.Onfilter_flow_rateChanging(value);
					this.SendPropertyChanging();
					this._filter_flow_rate = value;
					this.SendPropertyChanged("filter_flow_rate");
					this.Onfilter_flow_rateChanged();
				}
			}
		}
		
		[Column(Storage="_filter_principle_applications", DbType="NVarChar(MAX)")]
		public string filter_principle_applications
		{
			get
			{
				return this._filter_principle_applications;
			}
			set
			{
				if ((this._filter_principle_applications != value))
				{
					this.Onfilter_principle_applicationsChanging(value);
					this.SendPropertyChanging();
					this._filter_principle_applications = value;
					this.SendPropertyChanged("filter_principle_applications");
					this.Onfilter_principle_applicationsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_image", DbType="NVarChar(255)")]
		public string filter_image
		{
			get
			{
				return this._filter_image;
			}
			set
			{
				if ((this._filter_image != value))
				{
					this.Onfilter_imageChanging(value);
					this.SendPropertyChanging();
					this._filter_image = value;
					this.SendPropertyChanged("filter_image");
					this.Onfilter_imageChanged();
				}
			}
		}
		
		[Column(Storage="_filter_service_id", DbType="Int")]
		public System.Nullable<int> filter_service_id
		{
			get
			{
				return this._filter_service_id;
			}
			set
			{
				if ((this._filter_service_id != value))
				{
					if (this._WixFilterService.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_service_idChanging(value);
					this.SendPropertyChanging();
					this._filter_service_id = value;
					this.SendPropertyChanged("filter_service_id");
					this.Onfilter_service_idChanged();
				}
			}
		}
		
		[Association(Name="WixFilter_WixInterchange", Storage="_WixInterchanges", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<WixInterchange> WixInterchanges
		{
			get
			{
				return this._WixInterchanges;
			}
			set
			{
				this._WixInterchanges.Assign(value);
			}
		}
		
		[Association(Name="WixFilter_WixFiltronCross", Storage="_WixFiltronCrosses", ThisKey="filter_id", OtherKey="wix_filter_id")]
		public EntitySet<WixFiltronCross> WixFiltronCrosses
		{
			get
			{
				return this._WixFiltronCrosses;
			}
			set
			{
				this._WixFiltronCrosses.Assign(value);
			}
		}
		
		[Association(Name="WixFilter_WixFilterEngine", Storage="_WixFilterEngines", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<WixFilterEngine> WixFilterEngines
		{
			get
			{
				return this._WixFilterEngines;
			}
			set
			{
				this._WixFilterEngines.Assign(value);
			}
		}
		
		[Association(Name="WixFilter_wix_logistics_info", Storage="_WixLogisticsInfos", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<WixLogisticsInfo> WixLogisticsInfos
		{
			get
			{
				return this._WixLogisticsInfos;
			}
			set
			{
				this._WixLogisticsInfos.Assign(value);
			}
		}
		
		[Association(Name="WixFilterType_WixFilter", Storage="_WixFilterType", ThisKey="filter_type_id", OtherKey="type_id", IsForeignKey=true)]
		public WixFilterType WixFilterType
		{
			get
			{
				return this._WixFilterType.Entity;
			}
			set
			{
				WixFilterType previousValue = this._WixFilterType.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterType.Entity = null;
						previousValue.WixFilters.Remove(this);
					}
					this._WixFilterType.Entity = value;
					if ((value != null))
					{
						value.WixFilters.Add(this);
						this._filter_type_id = value.type_id;
					}
					else
					{
						this._filter_type_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixFilterType");
				}
			}
		}
		
		[Association(Name="WixFilterMedia_WixFilter", Storage="_WixFilterMedia", ThisKey="filter_media_id", OtherKey="media_id", IsForeignKey=true)]
		public WixFilterMedia WixFilterMedia
		{
			get
			{
				return this._WixFilterMedia.Entity;
			}
			set
			{
				WixFilterMedia previousValue = this._WixFilterMedia.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterMedia.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterMedia.Entity = null;
						previousValue.WixFilters.Remove(this);
					}
					this._WixFilterMedia.Entity = value;
					if ((value != null))
					{
						value.WixFilters.Add(this);
						this._filter_media_id = value.media_id;
					}
					else
					{
						this._filter_media_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixFilterMedia");
				}
			}
		}
		
		[Association(Name="WixFilterStyle_WixFilter", Storage="_WixFilterStyle", ThisKey="filter_style_id", OtherKey="style_id", IsForeignKey=true)]
		public WixFilterStyle WixFilterStyle
		{
			get
			{
				return this._WixFilterStyle.Entity;
			}
			set
			{
				WixFilterStyle previousValue = this._WixFilterStyle.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterStyle.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterStyle.Entity = null;
						previousValue.WixFilters.Remove(this);
					}
					this._WixFilterStyle.Entity = value;
					if ((value != null))
					{
						value.WixFilters.Add(this);
						this._filter_style_id = value.style_id;
					}
					else
					{
						this._filter_style_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixFilterStyle");
				}
			}
		}
		
		[Association(Name="WixFilterShape_WixFilter", Storage="_WixFilterShape", ThisKey="filter_shape_id", OtherKey="shape_id", IsForeignKey=true)]
		public WixFilterShape WixFilterShape
		{
			get
			{
				return this._WixFilterShape.Entity;
			}
			set
			{
				WixFilterShape previousValue = this._WixFilterShape.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterShape.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterShape.Entity = null;
						previousValue.WixFilters.Remove(this);
					}
					this._WixFilterShape.Entity = value;
					if ((value != null))
					{
						value.WixFilters.Add(this);
						this._filter_shape_id = value.shape_id;
					}
					else
					{
						this._filter_shape_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixFilterShape");
				}
			}
		}
		
		[Association(Name="WixFilterService_WixFilter", Storage="_WixFilterService", ThisKey="filter_service_id", OtherKey="service_id", IsForeignKey=true)]
		public WixFilterService WixFilterService
		{
			get
			{
				return this._WixFilterService.Entity;
			}
			set
			{
				WixFilterService previousValue = this._WixFilterService.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterService.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterService.Entity = null;
						previousValue.WixFilters.Remove(this);
					}
					this._WixFilterService.Entity = value;
					if ((value != null))
					{
						value.WixFilters.Add(this);
						this._filter_service_id = value.service_id;
					}
					else
					{
						this._filter_service_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("WixFilterService");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_WixInterchanges(WixInterchange entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = this;
		}
		
		private void detach_WixInterchanges(WixInterchange entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = null;
		}
		
		private void attach_WixFiltronCrosses(WixFiltronCross entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = this;
		}
		
		private void detach_WixFiltronCrosses(WixFiltronCross entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = null;
		}
		
		private void attach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = this;
		}
		
		private void detach_WixFilterEngines(WixFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = null;
		}
		
		private void attach_WixLogisticsInfos(WixLogisticsInfo entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = this;
		}
		
		private void detach_WixLogisticsInfos(WixLogisticsInfo entity)
		{
			this.SendPropertyChanging();
			entity.WixFilter = null;
		}
	}
	
	[Table(Name="dbo.filtron_filters")]
	public partial class FiltronFilter : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_id;
		
		private System.DateTime _filter_created;
		
		private System.DateTime _filter_modified;
		
		private string _filter_number;
		
		private string _filter_number_trim;
		
		private System.Nullable<int> _filter_type_id;
		
		private System.Nullable<int> _filter_media_id;
		
		private System.Nullable<int> _filter_style_id;
		
		private System.Nullable<int> _filter_shape_id;
		
		private System.Nullable<bool> _filter_by_pass_valve;
		
		private System.Nullable<bool> _filter_anti_drain_valve;
		
		private System.Nullable<bool> _filter_anti_siphon_valve;
		
		private string _filter_principle_applications;
		
		private string _filter_image;
		
		private decimal _filter_dim_a;
		
		private decimal _filter_dim_b;
		
		private decimal _filter_dim_c;
		
		private decimal _filter_dim_d;
		
		private decimal _filter_dim_e;
		
		private decimal _filter_dim_f;
		
		private decimal _filter_dim_g;
		
		private decimal _filter_dim_h;
		
		private string _filter_wix_number;
		
		private string _filter_wix_number_hd;
		
		private string _filter_dim_g_text;
		
		private string _filter_dim_f_text;
		
		private EntitySet<WixFiltronCross> _WixFiltronCrosses;
		
		private EntitySet<FiltronFilterEngine> _FiltronFilterEngines;
		
		private EntitySet<FiltronInterchange> _FiltronInterchanges;
		
		private EntitySet<FiltronLogisticsInfo> _FiltronLogisticsInfos;
		
		private EntityRef<FiltronFilterType> _FiltronFilterType;
		
		private EntityRef<FiltronFilterMedia> _FiltronFilterMedia;
		
		private EntityRef<FiltronFilterStyle> _FiltronFilterStyle;
		
		private EntityRef<FiltronFilterShape> _FiltronFilterShape;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onfilter_createdChanging(System.DateTime value);
    partial void Onfilter_createdChanged();
    partial void Onfilter_modifiedChanging(System.DateTime value);
    partial void Onfilter_modifiedChanged();
    partial void Onfilter_numberChanging(string value);
    partial void Onfilter_numberChanged();
    partial void Onfilter_number_trimChanging(string value);
    partial void Onfilter_number_trimChanged();
    partial void Onfilter_type_idChanging(System.Nullable<int> value);
    partial void Onfilter_type_idChanged();
    partial void Onfilter_media_idChanging(System.Nullable<int> value);
    partial void Onfilter_media_idChanged();
    partial void Onfilter_style_idChanging(System.Nullable<int> value);
    partial void Onfilter_style_idChanged();
    partial void Onfilter_shape_idChanging(System.Nullable<int> value);
    partial void Onfilter_shape_idChanged();
    partial void Onfilter_by_pass_valveChanging(System.Nullable<bool> value);
    partial void Onfilter_by_pass_valveChanged();
    partial void Onfilter_anti_drain_valveChanging(System.Nullable<bool> value);
    partial void Onfilter_anti_drain_valveChanged();
    partial void Onfilter_anti_siphon_valveChanging(System.Nullable<bool> value);
    partial void Onfilter_anti_siphon_valveChanged();
    partial void Onfilter_principle_applicationsChanging(string value);
    partial void Onfilter_principle_applicationsChanged();
    partial void Onfilter_imageChanging(string value);
    partial void Onfilter_imageChanged();
    partial void Onfilter_dim_aChanging(decimal value);
    partial void Onfilter_dim_aChanged();
    partial void Onfilter_dim_bChanging(decimal value);
    partial void Onfilter_dim_bChanged();
    partial void Onfilter_dim_cChanging(decimal value);
    partial void Onfilter_dim_cChanged();
    partial void Onfilter_dim_dChanging(decimal value);
    partial void Onfilter_dim_dChanged();
    partial void Onfilter_dim_eChanging(decimal value);
    partial void Onfilter_dim_eChanged();
    partial void Onfilter_dim_fChanging(decimal value);
    partial void Onfilter_dim_fChanged();
    partial void Onfilter_dim_gChanging(decimal value);
    partial void Onfilter_dim_gChanged();
    partial void Onfilter_dim_hChanging(decimal value);
    partial void Onfilter_dim_hChanged();
    partial void Onfilter_wix_numberChanging(string value);
    partial void Onfilter_wix_numberChanged();
    partial void Onfilter_wix_number_hdChanging(string value);
    partial void Onfilter_wix_number_hdChanged();
    partial void Onfilter_dim_g_textChanging(string value);
    partial void Onfilter_dim_g_textChanged();
    partial void Onfilter_dim_f_textChanging(string value);
    partial void Onfilter_dim_f_textChanged();
    #endregion
		
		public FiltronFilter()
		{
			this._WixFiltronCrosses = new EntitySet<WixFiltronCross>(new Action<WixFiltronCross>(this.attach_WixFiltronCrosses), new Action<WixFiltronCross>(this.detach_WixFiltronCrosses));
			this._FiltronFilterEngines = new EntitySet<FiltronFilterEngine>(new Action<FiltronFilterEngine>(this.attach_FiltronFilterEngines), new Action<FiltronFilterEngine>(this.detach_FiltronFilterEngines));
			this._FiltronInterchanges = new EntitySet<FiltronInterchange>(new Action<FiltronInterchange>(this.attach_FiltronInterchanges), new Action<FiltronInterchange>(this.detach_FiltronInterchanges));
			this._FiltronLogisticsInfos = new EntitySet<FiltronLogisticsInfo>(new Action<FiltronLogisticsInfo>(this.attach_FiltronLogisticsInfos), new Action<FiltronLogisticsInfo>(this.detach_FiltronLogisticsInfos));
			this._FiltronFilterType = default(EntityRef<FiltronFilterType>);
			this._FiltronFilterMedia = default(EntityRef<FiltronFilterMedia>);
			this._FiltronFilterStyle = default(EntityRef<FiltronFilterStyle>);
			this._FiltronFilterShape = default(EntityRef<FiltronFilterShape>);
			OnCreated();
		}
		
		[Column(Storage="_filter_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_created
		{
			get
			{
				return this._filter_created;
			}
			set
			{
				if ((this._filter_created != value))
				{
					this.Onfilter_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_created = value;
					this.SendPropertyChanged("filter_created");
					this.Onfilter_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_modified
		{
			get
			{
				return this._filter_modified;
			}
			set
			{
				if ((this._filter_modified != value))
				{
					this.Onfilter_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_modified = value;
					this.SendPropertyChanged("filter_modified");
					this.Onfilter_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_number", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string filter_number
		{
			get
			{
				return this._filter_number;
			}
			set
			{
				if ((this._filter_number != value))
				{
					this.Onfilter_numberChanging(value);
					this.SendPropertyChanging();
					this._filter_number = value;
					this.SendPropertyChanged("filter_number");
					this.Onfilter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_filter_number_trim", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string filter_number_trim
		{
			get
			{
				return this._filter_number_trim;
			}
			set
			{
				if ((this._filter_number_trim != value))
				{
					this.Onfilter_number_trimChanging(value);
					this.SendPropertyChanging();
					this._filter_number_trim = value;
					this.SendPropertyChanged("filter_number_trim");
					this.Onfilter_number_trimChanged();
				}
			}
		}
		
		[Column(Storage="_filter_type_id", DbType="Int")]
		public System.Nullable<int> filter_type_id
		{
			get
			{
				return this._filter_type_id;
			}
			set
			{
				if ((this._filter_type_id != value))
				{
					if (this._FiltronFilterType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_type_idChanging(value);
					this.SendPropertyChanging();
					this._filter_type_id = value;
					this.SendPropertyChanged("filter_type_id");
					this.Onfilter_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_media_id", DbType="Int")]
		public System.Nullable<int> filter_media_id
		{
			get
			{
				return this._filter_media_id;
			}
			set
			{
				if ((this._filter_media_id != value))
				{
					if (this._FiltronFilterMedia.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_media_idChanging(value);
					this.SendPropertyChanging();
					this._filter_media_id = value;
					this.SendPropertyChanged("filter_media_id");
					this.Onfilter_media_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_style_id", DbType="Int")]
		public System.Nullable<int> filter_style_id
		{
			get
			{
				return this._filter_style_id;
			}
			set
			{
				if ((this._filter_style_id != value))
				{
					if (this._FiltronFilterStyle.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_style_idChanging(value);
					this.SendPropertyChanging();
					this._filter_style_id = value;
					this.SendPropertyChanged("filter_style_id");
					this.Onfilter_style_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_shape_id", DbType="Int")]
		public System.Nullable<int> filter_shape_id
		{
			get
			{
				return this._filter_shape_id;
			}
			set
			{
				if ((this._filter_shape_id != value))
				{
					if (this._FiltronFilterShape.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_shape_idChanging(value);
					this.SendPropertyChanging();
					this._filter_shape_id = value;
					this.SendPropertyChanged("filter_shape_id");
					this.Onfilter_shape_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_by_pass_valve", DbType="Bit")]
		public System.Nullable<bool> filter_by_pass_valve
		{
			get
			{
				return this._filter_by_pass_valve;
			}
			set
			{
				if ((this._filter_by_pass_valve != value))
				{
					this.Onfilter_by_pass_valveChanging(value);
					this.SendPropertyChanging();
					this._filter_by_pass_valve = value;
					this.SendPropertyChanged("filter_by_pass_valve");
					this.Onfilter_by_pass_valveChanged();
				}
			}
		}
		
		[Column(Storage="_filter_anti_drain_valve", DbType="Bit")]
		public System.Nullable<bool> filter_anti_drain_valve
		{
			get
			{
				return this._filter_anti_drain_valve;
			}
			set
			{
				if ((this._filter_anti_drain_valve != value))
				{
					this.Onfilter_anti_drain_valveChanging(value);
					this.SendPropertyChanging();
					this._filter_anti_drain_valve = value;
					this.SendPropertyChanged("filter_anti_drain_valve");
					this.Onfilter_anti_drain_valveChanged();
				}
			}
		}
		
		[Column(Storage="_filter_anti_siphon_valve", DbType="Bit")]
		public System.Nullable<bool> filter_anti_siphon_valve
		{
			get
			{
				return this._filter_anti_siphon_valve;
			}
			set
			{
				if ((this._filter_anti_siphon_valve != value))
				{
					this.Onfilter_anti_siphon_valveChanging(value);
					this.SendPropertyChanging();
					this._filter_anti_siphon_valve = value;
					this.SendPropertyChanged("filter_anti_siphon_valve");
					this.Onfilter_anti_siphon_valveChanged();
				}
			}
		}
		
		[Column(Storage="_filter_principle_applications", DbType="NVarChar(MAX)")]
		public string filter_principle_applications
		{
			get
			{
				return this._filter_principle_applications;
			}
			set
			{
				if ((this._filter_principle_applications != value))
				{
					this.Onfilter_principle_applicationsChanging(value);
					this.SendPropertyChanging();
					this._filter_principle_applications = value;
					this.SendPropertyChanged("filter_principle_applications");
					this.Onfilter_principle_applicationsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_image", DbType="NVarChar(255)")]
		public string filter_image
		{
			get
			{
				return this._filter_image;
			}
			set
			{
				if ((this._filter_image != value))
				{
					this.Onfilter_imageChanging(value);
					this.SendPropertyChanging();
					this._filter_image = value;
					this.SendPropertyChanged("filter_image");
					this.Onfilter_imageChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_a", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_a
		{
			get
			{
				return this._filter_dim_a;
			}
			set
			{
				if ((this._filter_dim_a != value))
				{
					this.Onfilter_dim_aChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_a = value;
					this.SendPropertyChanged("filter_dim_a");
					this.Onfilter_dim_aChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_b", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_b
		{
			get
			{
				return this._filter_dim_b;
			}
			set
			{
				if ((this._filter_dim_b != value))
				{
					this.Onfilter_dim_bChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_b = value;
					this.SendPropertyChanged("filter_dim_b");
					this.Onfilter_dim_bChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_c", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_c
		{
			get
			{
				return this._filter_dim_c;
			}
			set
			{
				if ((this._filter_dim_c != value))
				{
					this.Onfilter_dim_cChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_c = value;
					this.SendPropertyChanged("filter_dim_c");
					this.Onfilter_dim_cChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_d", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_d
		{
			get
			{
				return this._filter_dim_d;
			}
			set
			{
				if ((this._filter_dim_d != value))
				{
					this.Onfilter_dim_dChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_d = value;
					this.SendPropertyChanged("filter_dim_d");
					this.Onfilter_dim_dChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_e", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_e
		{
			get
			{
				return this._filter_dim_e;
			}
			set
			{
				if ((this._filter_dim_e != value))
				{
					this.Onfilter_dim_eChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_e = value;
					this.SendPropertyChanged("filter_dim_e");
					this.Onfilter_dim_eChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_f", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_f
		{
			get
			{
				return this._filter_dim_f;
			}
			set
			{
				if ((this._filter_dim_f != value))
				{
					this.Onfilter_dim_fChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_f = value;
					this.SendPropertyChanged("filter_dim_f");
					this.Onfilter_dim_fChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_g", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_g
		{
			get
			{
				return this._filter_dim_g;
			}
			set
			{
				if ((this._filter_dim_g != value))
				{
					this.Onfilter_dim_gChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_g = value;
					this.SendPropertyChanged("filter_dim_g");
					this.Onfilter_dim_gChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_h", DbType="Decimal(18,4) NOT NULL")]
		public decimal filter_dim_h
		{
			get
			{
				return this._filter_dim_h;
			}
			set
			{
				if ((this._filter_dim_h != value))
				{
					this.Onfilter_dim_hChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_h = value;
					this.SendPropertyChanged("filter_dim_h");
					this.Onfilter_dim_hChanged();
				}
			}
		}
		
		[Column(Storage="_filter_wix_number", DbType="NVarChar(100)")]
		public string filter_wix_number
		{
			get
			{
				return this._filter_wix_number;
			}
			set
			{
				if ((this._filter_wix_number != value))
				{
					this.Onfilter_wix_numberChanging(value);
					this.SendPropertyChanging();
					this._filter_wix_number = value;
					this.SendPropertyChanged("filter_wix_number");
					this.Onfilter_wix_numberChanged();
				}
			}
		}
		
		[Column(Storage="_filter_wix_number_hd", DbType="NVarChar(100)")]
		public string filter_wix_number_hd
		{
			get
			{
				return this._filter_wix_number_hd;
			}
			set
			{
				if ((this._filter_wix_number_hd != value))
				{
					this.Onfilter_wix_number_hdChanging(value);
					this.SendPropertyChanging();
					this._filter_wix_number_hd = value;
					this.SendPropertyChanged("filter_wix_number_hd");
					this.Onfilter_wix_number_hdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_g_text")]
		public string filter_dim_g_text
		{
			get
			{
				return this._filter_dim_g_text;
			}
			set
			{
				if ((this._filter_dim_g_text != value))
				{
					this.Onfilter_dim_g_textChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_g_text = value;
					this.SendPropertyChanged("filter_dim_g_text");
					this.Onfilter_dim_g_textChanged();
				}
			}
		}
		
		[Column(Storage="_filter_dim_f_text")]
		public string filter_dim_f_text
		{
			get
			{
				return this._filter_dim_f_text;
			}
			set
			{
				if ((this._filter_dim_f_text != value))
				{
					this.Onfilter_dim_f_textChanging(value);
					this.SendPropertyChanging();
					this._filter_dim_f_text = value;
					this.SendPropertyChanged("filter_dim_f_text");
					this.Onfilter_dim_f_textChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilter_WixFiltronCross", Storage="_WixFiltronCrosses", ThisKey="filter_id", OtherKey="filtron_filter_id")]
		public EntitySet<WixFiltronCross> WixFiltronCrosses
		{
			get
			{
				return this._WixFiltronCrosses;
			}
			set
			{
				this._WixFiltronCrosses.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilter_FiltronFilterEngine", Storage="_FiltronFilterEngines", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<FiltronFilterEngine> FiltronFilterEngines
		{
			get
			{
				return this._FiltronFilterEngines;
			}
			set
			{
				this._FiltronFilterEngines.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilter_filtron_interchange", Storage="_FiltronInterchanges", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<FiltronInterchange> FiltronInterchanges
		{
			get
			{
				return this._FiltronInterchanges;
			}
			set
			{
				this._FiltronInterchanges.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilter_filtron_logistics_info", Storage="_FiltronLogisticsInfos", ThisKey="filter_id", OtherKey="filter_id")]
		public EntitySet<FiltronLogisticsInfo> FiltronLogisticsInfos
		{
			get
			{
				return this._FiltronLogisticsInfos;
			}
			set
			{
				this._FiltronLogisticsInfos.Assign(value);
			}
		}
		
		[Association(Name="FiltronFilterType_FiltronFilter", Storage="_FiltronFilterType", ThisKey="filter_type_id", OtherKey="type_id", IsForeignKey=true)]
		public FiltronFilterType FiltronFilterType
		{
			get
			{
				return this._FiltronFilterType.Entity;
			}
			set
			{
				FiltronFilterType previousValue = this._FiltronFilterType.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilterType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilterType.Entity = null;
						previousValue.FiltronFilters.Remove(this);
					}
					this._FiltronFilterType.Entity = value;
					if ((value != null))
					{
						value.FiltronFilters.Add(this);
						this._filter_type_id = value.type_id;
					}
					else
					{
						this._filter_type_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("FiltronFilterType");
				}
			}
		}
		
		[Association(Name="FiltronFilterMedia_FiltronFilter", Storage="_FiltronFilterMedia", ThisKey="filter_media_id", OtherKey="media_id", IsForeignKey=true)]
		public FiltronFilterMedia FiltronFilterMedia
		{
			get
			{
				return this._FiltronFilterMedia.Entity;
			}
			set
			{
				FiltronFilterMedia previousValue = this._FiltronFilterMedia.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilterMedia.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilterMedia.Entity = null;
						previousValue.FiltronFilters.Remove(this);
					}
					this._FiltronFilterMedia.Entity = value;
					if ((value != null))
					{
						value.FiltronFilters.Add(this);
						this._filter_media_id = value.media_id;
					}
					else
					{
						this._filter_media_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("FiltronFilterMedia");
				}
			}
		}
		
		[Association(Name="FiltronFilterStyle_FiltronFilter", Storage="_FiltronFilterStyle", ThisKey="filter_style_id", OtherKey="style_id", IsForeignKey=true)]
		public FiltronFilterStyle FiltronFilterStyle
		{
			get
			{
				return this._FiltronFilterStyle.Entity;
			}
			set
			{
				FiltronFilterStyle previousValue = this._FiltronFilterStyle.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilterStyle.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilterStyle.Entity = null;
						previousValue.FiltronFilters.Remove(this);
					}
					this._FiltronFilterStyle.Entity = value;
					if ((value != null))
					{
						value.FiltronFilters.Add(this);
						this._filter_style_id = value.style_id;
					}
					else
					{
						this._filter_style_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("FiltronFilterStyle");
				}
			}
		}
		
		[Association(Name="FiltronFilterShape_FiltronFilter", Storage="_FiltronFilterShape", ThisKey="filter_shape_id", OtherKey="shape_id", IsForeignKey=true)]
		public FiltronFilterShape FiltronFilterShape
		{
			get
			{
				return this._FiltronFilterShape.Entity;
			}
			set
			{
				FiltronFilterShape previousValue = this._FiltronFilterShape.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilterShape.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilterShape.Entity = null;
						previousValue.FiltronFilters.Remove(this);
					}
					this._FiltronFilterShape.Entity = value;
					if ((value != null))
					{
						value.FiltronFilters.Add(this);
						this._filter_shape_id = value.shape_id;
					}
					else
					{
						this._filter_shape_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("FiltronFilterShape");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_WixFiltronCrosses(WixFiltronCross entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = this;
		}
		
		private void detach_WixFiltronCrosses(WixFiltronCross entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = null;
		}
		
		private void attach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = this;
		}
		
		private void detach_FiltronFilterEngines(FiltronFilterEngine entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = null;
		}
		
		private void attach_FiltronInterchanges(FiltronInterchange entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = this;
		}
		
		private void detach_FiltronInterchanges(FiltronInterchange entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = null;
		}
		
		private void attach_FiltronLogisticsInfos(FiltronLogisticsInfo entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = this;
		}
		
		private void detach_FiltronLogisticsInfos(FiltronLogisticsInfo entity)
		{
			this.SendPropertyChanging();
			entity.FiltronFilter = null;
		}
	}
	
	[Table(Name="dbo.filtron_special_filters")]
	public partial class filtron_special_filter : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _special_filter_id;
		
		private System.DateTime _special_filter_created;
		
		private System.DateTime _special_filter_modified;
		
		private int _group_id;
		
		private int _filter_id;
		
		private string _special_filter_installation;
		
		private EntityRef<filtron_special_filter_group> _filtron_special_filter_group;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onspecial_filter_idChanging(int value);
    partial void Onspecial_filter_idChanged();
    partial void Onspecial_filter_createdChanging(System.DateTime value);
    partial void Onspecial_filter_createdChanged();
    partial void Onspecial_filter_modifiedChanging(System.DateTime value);
    partial void Onspecial_filter_modifiedChanged();
    partial void Ongroup_idChanging(int value);
    partial void Ongroup_idChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onspecial_filter_installationChanging(string value);
    partial void Onspecial_filter_installationChanged();
    #endregion
		
		public filtron_special_filter()
		{
			this._filtron_special_filter_group = default(EntityRef<filtron_special_filter_group>);
			OnCreated();
		}
		
		[Column(Storage="_special_filter_id", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int special_filter_id
		{
			get
			{
				return this._special_filter_id;
			}
			set
			{
				if ((this._special_filter_id != value))
				{
					this.Onspecial_filter_idChanging(value);
					this.SendPropertyChanging();
					this._special_filter_id = value;
					this.SendPropertyChanged("special_filter_id");
					this.Onspecial_filter_idChanged();
				}
			}
		}
		
		[Column(Storage="_special_filter_created", DbType="DateTime NOT NULL")]
		public System.DateTime special_filter_created
		{
			get
			{
				return this._special_filter_created;
			}
			set
			{
				if ((this._special_filter_created != value))
				{
					this.Onspecial_filter_createdChanging(value);
					this.SendPropertyChanging();
					this._special_filter_created = value;
					this.SendPropertyChanged("special_filter_created");
					this.Onspecial_filter_createdChanged();
				}
			}
		}
		
		[Column(Storage="_special_filter_modified", DbType="DateTime NOT NULL")]
		public System.DateTime special_filter_modified
		{
			get
			{
				return this._special_filter_modified;
			}
			set
			{
				if ((this._special_filter_modified != value))
				{
					this.Onspecial_filter_modifiedChanging(value);
					this.SendPropertyChanging();
					this._special_filter_modified = value;
					this.SendPropertyChanged("special_filter_modified");
					this.Onspecial_filter_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_group_id", DbType="Int NOT NULL")]
		public int group_id
		{
			get
			{
				return this._group_id;
			}
			set
			{
				if ((this._group_id != value))
				{
					if (this._filtron_special_filter_group.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Ongroup_idChanging(value);
					this.SendPropertyChanging();
					this._group_id = value;
					this.SendPropertyChanged("group_id");
					this.Ongroup_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_special_filter_installation", DbType="NVarChar(500) NOT NULL", CanBeNull=false)]
		public string special_filter_installation
		{
			get
			{
				return this._special_filter_installation;
			}
			set
			{
				if ((this._special_filter_installation != value))
				{
					this.Onspecial_filter_installationChanging(value);
					this.SendPropertyChanging();
					this._special_filter_installation = value;
					this.SendPropertyChanged("special_filter_installation");
					this.Onspecial_filter_installationChanged();
				}
			}
		}
		
		[Association(Name="filtron_special_filter_group_filtron_special_filter", Storage="_filtron_special_filter_group", ThisKey="group_id", OtherKey="group_id", IsForeignKey=true)]
		public filtron_special_filter_group filtron_special_filter_group
		{
			get
			{
				return this._filtron_special_filter_group.Entity;
			}
			set
			{
				filtron_special_filter_group previousValue = this._filtron_special_filter_group.Entity;
				if (((previousValue != value) 
							|| (this._filtron_special_filter_group.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._filtron_special_filter_group.Entity = null;
						previousValue.filtron_special_filters.Remove(this);
					}
					this._filtron_special_filter_group.Entity = value;
					if ((value != null))
					{
						value.filtron_special_filters.Add(this);
						this._group_id = value.group_id;
					}
					else
					{
						this._group_id = default(int);
					}
					this.SendPropertyChanged("filtron_special_filter_group");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.filtron_special_filter_groups")]
	public partial class filtron_special_filter_group : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _group_id;
		
		private System.DateTime _group_created;
		
		private System.DateTime _group_modified;
		
		private string _group_name;
		
		private string _group_abbr;
		
		private EntitySet<filtron_special_filter> _filtron_special_filters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Ongroup_idChanging(int value);
    partial void Ongroup_idChanged();
    partial void Ongroup_createdChanging(System.DateTime value);
    partial void Ongroup_createdChanged();
    partial void Ongroup_modifiedChanging(System.DateTime value);
    partial void Ongroup_modifiedChanged();
    partial void Ongroup_nameChanging(string value);
    partial void Ongroup_nameChanged();
    partial void Ongroup_abbrChanging(string value);
    partial void Ongroup_abbrChanged();
    #endregion
		
		public filtron_special_filter_group()
		{
			this._filtron_special_filters = new EntitySet<filtron_special_filter>(new Action<filtron_special_filter>(this.attach_filtron_special_filters), new Action<filtron_special_filter>(this.detach_filtron_special_filters));
			OnCreated();
		}
		
		[Column(Storage="_group_id", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int group_id
		{
			get
			{
				return this._group_id;
			}
			set
			{
				if ((this._group_id != value))
				{
					this.Ongroup_idChanging(value);
					this.SendPropertyChanging();
					this._group_id = value;
					this.SendPropertyChanged("group_id");
					this.Ongroup_idChanged();
				}
			}
		}
		
		[Column(Storage="_group_created", DbType="DateTime NOT NULL")]
		public System.DateTime group_created
		{
			get
			{
				return this._group_created;
			}
			set
			{
				if ((this._group_created != value))
				{
					this.Ongroup_createdChanging(value);
					this.SendPropertyChanging();
					this._group_created = value;
					this.SendPropertyChanged("group_created");
					this.Ongroup_createdChanged();
				}
			}
		}
		
		[Column(Storage="_group_modified", DbType="DateTime NOT NULL")]
		public System.DateTime group_modified
		{
			get
			{
				return this._group_modified;
			}
			set
			{
				if ((this._group_modified != value))
				{
					this.Ongroup_modifiedChanging(value);
					this.SendPropertyChanging();
					this._group_modified = value;
					this.SendPropertyChanged("group_modified");
					this.Ongroup_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_group_name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string group_name
		{
			get
			{
				return this._group_name;
			}
			set
			{
				if ((this._group_name != value))
				{
					this.Ongroup_nameChanging(value);
					this.SendPropertyChanging();
					this._group_name = value;
					this.SendPropertyChanged("group_name");
					this.Ongroup_nameChanged();
				}
			}
		}
		
		[Column(Storage="_group_abbr", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string group_abbr
		{
			get
			{
				return this._group_abbr;
			}
			set
			{
				if ((this._group_abbr != value))
				{
					this.Ongroup_abbrChanging(value);
					this.SendPropertyChanging();
					this._group_abbr = value;
					this.SendPropertyChanged("group_abbr");
					this.Ongroup_abbrChanged();
				}
			}
		}
		
		[Association(Name="filtron_special_filter_group_filtron_special_filter", Storage="_filtron_special_filters", ThisKey="group_id", OtherKey="group_id")]
		public EntitySet<filtron_special_filter> filtron_special_filters
		{
			get
			{
				return this._filtron_special_filters;
			}
			set
			{
				this._filtron_special_filters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_filtron_special_filters(filtron_special_filter entity)
		{
			this.SendPropertyChanging();
			entity.filtron_special_filter_group = this;
		}
		
		private void detach_filtron_special_filters(filtron_special_filter entity)
		{
			this.SendPropertyChanging();
			entity.filtron_special_filter_group = null;
		}
	}
	
	[Table(Name="dbo.filtron_filter_engine_comments")]
	public partial class FiltronFilterEngineComment : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_engine_comment_id;
		
		private System.DateTime _filter_engine_comment_created;
		
		private System.DateTime _filter_engine_comment_modified;
		
		private int _filter_engine_id;
		
		private string _filter_info_years;
		
		private string _filter_info_description;
		
		private EntityRef<FiltronFilterEngine> _FiltronFilterEngine;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_engine_comment_idChanging(int value);
    partial void Onfilter_engine_comment_idChanged();
    partial void Onfilter_engine_comment_createdChanging(System.DateTime value);
    partial void Onfilter_engine_comment_createdChanged();
    partial void Onfilter_engine_comment_modifiedChanging(System.DateTime value);
    partial void Onfilter_engine_comment_modifiedChanged();
    partial void Onfilter_engine_idChanging(int value);
    partial void Onfilter_engine_idChanged();
    partial void Onfilter_info_yearsChanging(string value);
    partial void Onfilter_info_yearsChanged();
    partial void Onfilter_info_descriptionChanging(string value);
    partial void Onfilter_info_descriptionChanged();
    #endregion
		
		public FiltronFilterEngineComment()
		{
			this._FiltronFilterEngine = default(EntityRef<FiltronFilterEngine>);
			OnCreated();
		}
		
		[Column(Storage="_filter_engine_comment_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_engine_comment_id
		{
			get
			{
				return this._filter_engine_comment_id;
			}
			set
			{
				if ((this._filter_engine_comment_id != value))
				{
					this.Onfilter_engine_comment_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_id = value;
					this.SendPropertyChanged("filter_engine_comment_id");
					this.Onfilter_engine_comment_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_comment_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_comment_created
		{
			get
			{
				return this._filter_engine_comment_created;
			}
			set
			{
				if ((this._filter_engine_comment_created != value))
				{
					this.Onfilter_engine_comment_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_created = value;
					this.SendPropertyChanged("filter_engine_comment_created");
					this.Onfilter_engine_comment_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_comment_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_comment_modified
		{
			get
			{
				return this._filter_engine_comment_modified;
			}
			set
			{
				if ((this._filter_engine_comment_modified != value))
				{
					this.Onfilter_engine_comment_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_modified = value;
					this.SendPropertyChanged("filter_engine_comment_modified");
					this.Onfilter_engine_comment_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_id", DbType="Int NOT NULL")]
		public int filter_engine_id
		{
			get
			{
				return this._filter_engine_id;
			}
			set
			{
				if ((this._filter_engine_id != value))
				{
					if (this._FiltronFilterEngine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_engine_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_id = value;
					this.SendPropertyChanged("filter_engine_id");
					this.Onfilter_engine_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_info_years", DbType="NVarChar(255)")]
		public string filter_info_years
		{
			get
			{
				return this._filter_info_years;
			}
			set
			{
				if ((this._filter_info_years != value))
				{
					this.Onfilter_info_yearsChanging(value);
					this.SendPropertyChanging();
					this._filter_info_years = value;
					this.SendPropertyChanged("filter_info_years");
					this.Onfilter_info_yearsChanged();
				}
			}
		}
		
		[Column(Storage="_filter_info_description", DbType="NVarChar(255)")]
		public string filter_info_description
		{
			get
			{
				return this._filter_info_description;
			}
			set
			{
				if ((this._filter_info_description != value))
				{
					this.Onfilter_info_descriptionChanging(value);
					this.SendPropertyChanging();
					this._filter_info_description = value;
					this.SendPropertyChanged("filter_info_description");
					this.Onfilter_info_descriptionChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilterEngine_FiltronFilterEngineComment", Storage="_FiltronFilterEngine", ThisKey="filter_engine_id", OtherKey="filter_engine_id", IsForeignKey=true)]
		public FiltronFilterEngine FiltronFilterEngine
		{
			get
			{
				return this._FiltronFilterEngine.Entity;
			}
			set
			{
				FiltronFilterEngine previousValue = this._FiltronFilterEngine.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilterEngine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilterEngine.Entity = null;
						previousValue.FiltronFilterEngineComments.Remove(this);
					}
					this._FiltronFilterEngine.Entity = value;
					if ((value != null))
					{
						value.FiltronFilterEngineComments.Add(this);
						this._filter_engine_id = value.filter_engine_id;
					}
					else
					{
						this._filter_engine_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilterEngine");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_footnotes")]
	public partial class WixFootnote : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _footnote_id;
		
		private System.DateTime _footnote_created;
		
		private System.DateTime _footnote_modified;
		
		private string _footnote_name;
		
		private int _org_footnote_id;
		
		private EntitySet<WixFilterEngineFootnote> _wix_filter_engine_footnotes;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfootnote_idChanging(int value);
    partial void Onfootnote_idChanged();
    partial void Onfootnote_createdChanging(System.DateTime value);
    partial void Onfootnote_createdChanged();
    partial void Onfootnote_modifiedChanging(System.DateTime value);
    partial void Onfootnote_modifiedChanged();
    partial void Onfootnote_nameChanging(string value);
    partial void Onfootnote_nameChanged();
    partial void Onorg_footnote_idChanging(int value);
    partial void Onorg_footnote_idChanged();
    #endregion
		
		public WixFootnote()
		{
			this._wix_filter_engine_footnotes = new EntitySet<WixFilterEngineFootnote>(new Action<WixFilterEngineFootnote>(this.attach_wix_filter_engine_footnotes), new Action<WixFilterEngineFootnote>(this.detach_wix_filter_engine_footnotes));
			OnCreated();
		}
		
		[Column(Storage="_footnote_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int footnote_id
		{
			get
			{
				return this._footnote_id;
			}
			set
			{
				if ((this._footnote_id != value))
				{
					this.Onfootnote_idChanging(value);
					this.SendPropertyChanging();
					this._footnote_id = value;
					this.SendPropertyChanged("footnote_id");
					this.Onfootnote_idChanged();
				}
			}
		}
		
		[Column(Storage="_footnote_created", DbType="DateTime NOT NULL")]
		public System.DateTime footnote_created
		{
			get
			{
				return this._footnote_created;
			}
			set
			{
				if ((this._footnote_created != value))
				{
					this.Onfootnote_createdChanging(value);
					this.SendPropertyChanging();
					this._footnote_created = value;
					this.SendPropertyChanged("footnote_created");
					this.Onfootnote_createdChanged();
				}
			}
		}
		
		[Column(Storage="_footnote_modified", DbType="DateTime NOT NULL")]
		public System.DateTime footnote_modified
		{
			get
			{
				return this._footnote_modified;
			}
			set
			{
				if ((this._footnote_modified != value))
				{
					this.Onfootnote_modifiedChanging(value);
					this.SendPropertyChanging();
					this._footnote_modified = value;
					this.SendPropertyChanged("footnote_modified");
					this.Onfootnote_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_footnote_name", DbType="NVarChar(255)")]
		public string footnote_name
		{
			get
			{
				return this._footnote_name;
			}
			set
			{
				if ((this._footnote_name != value))
				{
					this.Onfootnote_nameChanging(value);
					this.SendPropertyChanging();
					this._footnote_name = value;
					this.SendPropertyChanged("footnote_name");
					this.Onfootnote_nameChanged();
				}
			}
		}
		
		[Column(Storage="_org_footnote_id", DbType="Int NOT NULL")]
		public int org_footnote_id
		{
			get
			{
				return this._org_footnote_id;
			}
			set
			{
				if ((this._org_footnote_id != value))
				{
					this.Onorg_footnote_idChanging(value);
					this.SendPropertyChanging();
					this._org_footnote_id = value;
					this.SendPropertyChanged("org_footnote_id");
					this.Onorg_footnote_idChanged();
				}
			}
		}
		
		[Association(Name="WixFootnote_WixFilterEngineFootnote", Storage="_wix_filter_engine_footnotes", ThisKey="footnote_id", OtherKey="footnote_id")]
		public EntitySet<WixFilterEngineFootnote> WixFilterEngineFootnotes
		{
			get
			{
				return this._wix_filter_engine_footnotes;
			}
			set
			{
				this._wix_filter_engine_footnotes.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_wix_filter_engine_footnotes(WixFilterEngineFootnote entity)
		{
			this.SendPropertyChanging();
			entity.WixFootnote = this;
		}
		
		private void detach_wix_filter_engine_footnotes(WixFilterEngineFootnote entity)
		{
			this.SendPropertyChanging();
			entity.WixFootnote = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_engine_footnote")]
	public partial class WixFilterEngineFootnote : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_engine_footnote_id;
		
		private System.DateTime _filter_engine_footnote_created;
		
		private System.DateTime _filter_engine_footnote_modified;
		
		private int _filter_engine_id;
		
		private int _footnote_id;
		
		private EntityRef<WixFilterEngine> _WixFilterEngine;
		
		private EntityRef<WixFootnote> _wix_footnote;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_engine_footnote_idChanging(int value);
    partial void Onfilter_engine_footnote_idChanged();
    partial void Onfilter_engine_footnote_createdChanging(System.DateTime value);
    partial void Onfilter_engine_footnote_createdChanged();
    partial void Onfilter_engine_footnote_modifiedChanging(System.DateTime value);
    partial void Onfilter_engine_footnote_modifiedChanged();
    partial void Onfilter_engine_idChanging(int value);
    partial void Onfilter_engine_idChanged();
    partial void Onfootnote_idChanging(int value);
    partial void Onfootnote_idChanged();
    #endregion
		
		public WixFilterEngineFootnote()
		{
			this._WixFilterEngine = default(EntityRef<WixFilterEngine>);
			this._wix_footnote = default(EntityRef<WixFootnote>);
			OnCreated();
		}
		
		[Column(Storage="_filter_engine_footnote_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_engine_footnote_id
		{
			get
			{
				return this._filter_engine_footnote_id;
			}
			set
			{
				if ((this._filter_engine_footnote_id != value))
				{
					this.Onfilter_engine_footnote_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_footnote_id = value;
					this.SendPropertyChanged("filter_engine_footnote_id");
					this.Onfilter_engine_footnote_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_footnote_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_footnote_created
		{
			get
			{
				return this._filter_engine_footnote_created;
			}
			set
			{
				if ((this._filter_engine_footnote_created != value))
				{
					this.Onfilter_engine_footnote_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_footnote_created = value;
					this.SendPropertyChanged("filter_engine_footnote_created");
					this.Onfilter_engine_footnote_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_footnote_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_footnote_modified
		{
			get
			{
				return this._filter_engine_footnote_modified;
			}
			set
			{
				if ((this._filter_engine_footnote_modified != value))
				{
					this.Onfilter_engine_footnote_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_footnote_modified = value;
					this.SendPropertyChanged("filter_engine_footnote_modified");
					this.Onfilter_engine_footnote_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_id", DbType="Int NOT NULL")]
		public int filter_engine_id
		{
			get
			{
				return this._filter_engine_id;
			}
			set
			{
				if ((this._filter_engine_id != value))
				{
					if (this._WixFilterEngine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_engine_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_id = value;
					this.SendPropertyChanged("filter_engine_id");
					this.Onfilter_engine_idChanged();
				}
			}
		}
		
		[Column(Storage="_footnote_id", DbType="Int NOT NULL")]
		public int footnote_id
		{
			get
			{
				return this._footnote_id;
			}
			set
			{
				if ((this._footnote_id != value))
				{
					if (this._wix_footnote.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfootnote_idChanging(value);
					this.SendPropertyChanging();
					this._footnote_id = value;
					this.SendPropertyChanged("footnote_id");
					this.Onfootnote_idChanged();
				}
			}
		}
		
		[Association(Name="WixFilterEngine_WixFilterEngineFootnote", Storage="_WixFilterEngine", ThisKey="filter_engine_id", OtherKey="filter_engine_id", IsForeignKey=true)]
		public WixFilterEngine WixFilterEngine
		{
			get
			{
				return this._WixFilterEngine.Entity;
			}
			set
			{
				WixFilterEngine previousValue = this._WixFilterEngine.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterEngine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterEngine.Entity = null;
						previousValue.WixFilterEngineFootnotes.Remove(this);
					}
					this._WixFilterEngine.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngineFootnotes.Add(this);
						this._filter_engine_id = value.filter_engine_id;
					}
					else
					{
						this._filter_engine_id = default(int);
					}
					this.SendPropertyChanged("WixFilterEngine");
				}
			}
		}
		
		[Association(Name="WixFootnote_WixFilterEngineFootnote", Storage="_wix_footnote", ThisKey="footnote_id", OtherKey="footnote_id", IsForeignKey=true)]
		public WixFootnote WixFootnote
		{
			get
			{
				return this._wix_footnote.Entity;
			}
			set
			{
				WixFootnote previousValue = this._wix_footnote.Entity;
				if (((previousValue != value) 
							|| (this._wix_footnote.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._wix_footnote.Entity = null;
						previousValue.WixFilterEngineFootnotes.Remove(this);
					}
					this._wix_footnote.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngineFootnotes.Add(this);
						this._footnote_id = value.footnote_id;
					}
					else
					{
						this._footnote_id = default(int);
					}
					this.SendPropertyChanged("WixFootnote");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_filter_engine_comments")]
	public partial class WixFilterEngineComment : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _filter_engine_comment_id;
		
		private System.DateTime _filter_engine_comment_created;
		
		private System.DateTime _filter_engine_comment_modified;
		
		private int _filter_engine_id;
		
		private string _filter_additional_info;
		
		private System.Nullable<int> _applicable_year;
		
		private EntityRef<WixFilterEngine> _WixFilterEngine;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onfilter_engine_comment_idChanging(int value);
    partial void Onfilter_engine_comment_idChanged();
    partial void Onfilter_engine_comment_createdChanging(System.DateTime value);
    partial void Onfilter_engine_comment_createdChanged();
    partial void Onfilter_engine_comment_modifiedChanging(System.DateTime value);
    partial void Onfilter_engine_comment_modifiedChanged();
    partial void Onfilter_engine_idChanging(int value);
    partial void Onfilter_engine_idChanged();
    partial void Onfilter_additional_infoChanging(string value);
    partial void Onfilter_additional_infoChanged();
    partial void Onapplicable_yearChanging(System.Nullable<int> value);
    partial void Onapplicable_yearChanged();
    #endregion
		
		public WixFilterEngineComment()
		{
			this._WixFilterEngine = default(EntityRef<WixFilterEngine>);
			OnCreated();
		}
		
		[Column(Storage="_filter_engine_comment_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int filter_engine_comment_id
		{
			get
			{
				return this._filter_engine_comment_id;
			}
			set
			{
				if ((this._filter_engine_comment_id != value))
				{
					this.Onfilter_engine_comment_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_id = value;
					this.SendPropertyChanged("filter_engine_comment_id");
					this.Onfilter_engine_comment_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_comment_created", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_comment_created
		{
			get
			{
				return this._filter_engine_comment_created;
			}
			set
			{
				if ((this._filter_engine_comment_created != value))
				{
					this.Onfilter_engine_comment_createdChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_created = value;
					this.SendPropertyChanged("filter_engine_comment_created");
					this.Onfilter_engine_comment_createdChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_comment_modified", DbType="DateTime NOT NULL")]
		public System.DateTime filter_engine_comment_modified
		{
			get
			{
				return this._filter_engine_comment_modified;
			}
			set
			{
				if ((this._filter_engine_comment_modified != value))
				{
					this.Onfilter_engine_comment_modifiedChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_comment_modified = value;
					this.SendPropertyChanged("filter_engine_comment_modified");
					this.Onfilter_engine_comment_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_engine_id", DbType="Int NOT NULL")]
		public int filter_engine_id
		{
			get
			{
				return this._filter_engine_id;
			}
			set
			{
				if ((this._filter_engine_id != value))
				{
					if (this._WixFilterEngine.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_engine_idChanging(value);
					this.SendPropertyChanging();
					this._filter_engine_id = value;
					this.SendPropertyChanged("filter_engine_id");
					this.Onfilter_engine_idChanged();
				}
			}
		}
		
		[Column(Storage="_filter_additional_info", DbType="NVarChar(400)")]
		public string filter_additional_info
		{
			get
			{
				return this._filter_additional_info;
			}
			set
			{
				if ((this._filter_additional_info != value))
				{
					this.Onfilter_additional_infoChanging(value);
					this.SendPropertyChanging();
					this._filter_additional_info = value;
					this.SendPropertyChanged("filter_additional_info");
					this.Onfilter_additional_infoChanged();
				}
			}
		}
		
		[Column(Storage="_applicable_year", DbType="Int")]
		public System.Nullable<int> applicable_year
		{
			get
			{
				return this._applicable_year;
			}
			set
			{
				if ((this._applicable_year != value))
				{
					this.Onapplicable_yearChanging(value);
					this.SendPropertyChanging();
					this._applicable_year = value;
					this.SendPropertyChanged("applicable_year");
					this.Onapplicable_yearChanged();
				}
			}
		}
		
		[Association(Name="WixFilterEngine_WixFilterEngineComment", Storage="_WixFilterEngine", ThisKey="filter_engine_id", OtherKey="filter_engine_id", IsForeignKey=true)]
		public WixFilterEngine WixFilterEngine
		{
			get
			{
				return this._WixFilterEngine.Entity;
			}
			set
			{
				WixFilterEngine previousValue = this._WixFilterEngine.Entity;
				if (((previousValue != value) 
							|| (this._WixFilterEngine.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilterEngine.Entity = null;
						previousValue.WixFilterEngineComments.Remove(this);
					}
					this._WixFilterEngine.Entity = value;
					if ((value != null))
					{
						value.WixFilterEngineComments.Add(this);
						this._filter_engine_id = value.filter_engine_id;
					}
					else
					{
						this._filter_engine_id = default(int);
					}
					this.SendPropertyChanged("WixFilterEngine");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.last_searches")]
	public partial class LastSearch : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _last_search_id;
		
		private string _last_search_name;
		
		private string _last_search_link;
		
		private int _language_id;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onlast_search_idChanging(int value);
    partial void Onlast_search_idChanged();
    partial void Onlast_search_nameChanging(string value);
    partial void Onlast_search_nameChanged();
    partial void Onlast_search_linkChanging(string value);
    partial void Onlast_search_linkChanged();
    partial void Onlanguage_idChanging(int value);
    partial void Onlanguage_idChanged();
    #endregion
		
		public LastSearch()
		{
			OnCreated();
		}
		
		[Column(Storage="_last_search_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int last_search_id
		{
			get
			{
				return this._last_search_id;
			}
			set
			{
				if ((this._last_search_id != value))
				{
					this.Onlast_search_idChanging(value);
					this.SendPropertyChanging();
					this._last_search_id = value;
					this.SendPropertyChanged("last_search_id");
					this.Onlast_search_idChanged();
				}
			}
		}
		
		[Column(Storage="_last_search_name", DbType="NVarChar(255)")]
		public string last_search_name
		{
			get
			{
				return this._last_search_name;
			}
			set
			{
				if ((this._last_search_name != value))
				{
					this.Onlast_search_nameChanging(value);
					this.SendPropertyChanging();
					this._last_search_name = value;
					this.SendPropertyChanged("last_search_name");
					this.Onlast_search_nameChanged();
				}
			}
		}
		
		[Column(Storage="_last_search_link", DbType="NVarChar(255)")]
		public string last_search_link
		{
			get
			{
				return this._last_search_link;
			}
			set
			{
				if ((this._last_search_link != value))
				{
					this.Onlast_search_linkChanging(value);
					this.SendPropertyChanging();
					this._last_search_link = value;
					this.SendPropertyChanged("last_search_link");
					this.Onlast_search_linkChanged();
				}
			}
		}
		
		[Column(Storage="_language_id")]
		public int language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.users")]
	public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _user_id;
		
		private System.DateTime _user_created;
		
		private System.DateTime _user_modified;
		
		private string _user_login;
		
		private string _user_first_name;
		
		private string _user_last_name;
		
		private string _user_mail_address;
		
		private string _user_pass_hash;
		
		private string _user_pass_salt;
		
		private System.Nullable<bool> _user_active;
		
		private System.Nullable<int> _user_created_by_id;
		
		private System.Nullable<int> _user_modified_by_id;
		
		private System.Nullable<bool> _user_permission_access;
		
		private EntitySet<Gallery> _Galleries;
		
		private EntitySet<Gallery> _Galleries1;
		
		private EntitySet<GalleryImage> _GalleryImages;
		
		private EntitySet<GalleryImage> _GalleryImages1;
		
		private EntitySet<MenuItem> _MenuItems;
		
		private EntitySet<MenuItem> _MenuItems1;
		
		private EntitySet<Page> _Pages;
		
		private EntitySet<Page> _Pages1;
		
		private EntitySet<VariableValue> _VariableValues;
		
		private EntitySet<VariableValue> _VariableValues1;
		
		private EntitySet<Variable> _Variables;
		
		private EntitySet<Variable> _Variables1;
		
		private EntitySet<User> _users;
		
		private EntitySet<User> _Users1;
		
		private EntitySet<UserLanguage> _UserLanguages;
		
		private EntitySet<UserPageType> _UserPageTypes;
		
		private EntitySet<Language> _languages;
		
		private EntitySet<Language> _Languages1;
		
		private EntityRef<User> _user1;
		
		private EntityRef<User> _user2;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onuser_idChanging(int value);
    partial void Onuser_idChanged();
    partial void Onuser_createdChanging(System.DateTime value);
    partial void Onuser_createdChanged();
    partial void Onuser_modifiedChanging(System.DateTime value);
    partial void Onuser_modifiedChanged();
    partial void Onuser_loginChanging(string value);
    partial void Onuser_loginChanged();
    partial void Onuser_first_nameChanging(string value);
    partial void Onuser_first_nameChanged();
    partial void Onuser_last_nameChanging(string value);
    partial void Onuser_last_nameChanged();
    partial void Onuser_mail_addressChanging(string value);
    partial void Onuser_mail_addressChanged();
    partial void Onuser_pass_hashChanging(string value);
    partial void Onuser_pass_hashChanged();
    partial void Onuser_pass_saltChanging(string value);
    partial void Onuser_pass_saltChanged();
    partial void Onuser_activeChanging(System.Nullable<bool> value);
    partial void Onuser_activeChanged();
    partial void Onuser_created_by_idChanging(System.Nullable<int> value);
    partial void Onuser_created_by_idChanged();
    partial void Onuser_modified_by_idChanging(System.Nullable<int> value);
    partial void Onuser_modified_by_idChanged();
    partial void Onuser_permission_accessChanging(System.Nullable<bool> value);
    partial void Onuser_permission_accessChanged();
    #endregion
		
		public User()
		{
			this._Galleries = new EntitySet<Gallery>(new Action<Gallery>(this.attach_Galleries), new Action<Gallery>(this.detach_Galleries));
			this._Galleries1 = new EntitySet<Gallery>(new Action<Gallery>(this.attach_Galleries1), new Action<Gallery>(this.detach_Galleries1));
			this._GalleryImages = new EntitySet<GalleryImage>(new Action<GalleryImage>(this.attach_GalleryImages), new Action<GalleryImage>(this.detach_GalleryImages));
			this._GalleryImages1 = new EntitySet<GalleryImage>(new Action<GalleryImage>(this.attach_GalleryImages1), new Action<GalleryImage>(this.detach_GalleryImages1));
			this._MenuItems = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems), new Action<MenuItem>(this.detach_MenuItems));
			this._MenuItems1 = new EntitySet<MenuItem>(new Action<MenuItem>(this.attach_MenuItems1), new Action<MenuItem>(this.detach_MenuItems1));
			this._Pages = new EntitySet<Page>(new Action<Page>(this.attach_Pages), new Action<Page>(this.detach_Pages));
			this._Pages1 = new EntitySet<Page>(new Action<Page>(this.attach_Pages1), new Action<Page>(this.detach_Pages1));
			this._VariableValues = new EntitySet<VariableValue>(new Action<VariableValue>(this.attach_VariableValues), new Action<VariableValue>(this.detach_VariableValues));
			this._VariableValues1 = new EntitySet<VariableValue>(new Action<VariableValue>(this.attach_VariableValues1), new Action<VariableValue>(this.detach_VariableValues1));
			this._Variables = new EntitySet<Variable>(new Action<Variable>(this.attach_Variables), new Action<Variable>(this.detach_Variables));
			this._Variables1 = new EntitySet<Variable>(new Action<Variable>(this.attach_Variables1), new Action<Variable>(this.detach_Variables1));
			this._users = new EntitySet<User>(new Action<User>(this.attach_users), new Action<User>(this.detach_users));
			this._Users1 = new EntitySet<User>(new Action<User>(this.attach_Users1), new Action<User>(this.detach_Users1));
			this._UserLanguages = new EntitySet<UserLanguage>(new Action<UserLanguage>(this.attach_UserLanguages), new Action<UserLanguage>(this.detach_UserLanguages));
			this._UserPageTypes = new EntitySet<UserPageType>(new Action<UserPageType>(this.attach_UserPageTypes), new Action<UserPageType>(this.detach_UserPageTypes));
			this._languages = new EntitySet<Language>(new Action<Language>(this.attach_languages), new Action<Language>(this.detach_languages));
			this._Languages1 = new EntitySet<Language>(new Action<Language>(this.attach_Languages1), new Action<Language>(this.detach_Languages1));
			this._user1 = default(EntityRef<User>);
			this._user2 = default(EntityRef<User>);
			OnCreated();
		}
		
		[Column(Storage="_user_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int user_id
		{
			get
			{
				return this._user_id;
			}
			set
			{
				if ((this._user_id != value))
				{
					this.Onuser_idChanging(value);
					this.SendPropertyChanging();
					this._user_id = value;
					this.SendPropertyChanged("user_id");
					this.Onuser_idChanged();
				}
			}
		}
		
		[Column(Storage="_user_created", DbType="DateTime NOT NULL")]
		public System.DateTime user_created
		{
			get
			{
				return this._user_created;
			}
			set
			{
				if ((this._user_created != value))
				{
					this.Onuser_createdChanging(value);
					this.SendPropertyChanging();
					this._user_created = value;
					this.SendPropertyChanged("user_created");
					this.Onuser_createdChanged();
				}
			}
		}
		
		[Column(Storage="_user_modified", DbType="DateTime NOT NULL")]
		public System.DateTime user_modified
		{
			get
			{
				return this._user_modified;
			}
			set
			{
				if ((this._user_modified != value))
				{
					this.Onuser_modifiedChanging(value);
					this.SendPropertyChanging();
					this._user_modified = value;
					this.SendPropertyChanged("user_modified");
					this.Onuser_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_user_login", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string user_login
		{
			get
			{
				return this._user_login;
			}
			set
			{
				if ((this._user_login != value))
				{
					this.Onuser_loginChanging(value);
					this.SendPropertyChanging();
					this._user_login = value;
					this.SendPropertyChanged("user_login");
					this.Onuser_loginChanged();
				}
			}
		}
		
		[Column(Storage="_user_first_name", DbType="NVarChar(50)")]
		public string user_first_name
		{
			get
			{
				return this._user_first_name;
			}
			set
			{
				if ((this._user_first_name != value))
				{
					this.Onuser_first_nameChanging(value);
					this.SendPropertyChanging();
					this._user_first_name = value;
					this.SendPropertyChanged("user_first_name");
					this.Onuser_first_nameChanged();
				}
			}
		}
		
		[Column(Storage="_user_last_name", DbType="NVarChar(50)")]
		public string user_last_name
		{
			get
			{
				return this._user_last_name;
			}
			set
			{
				if ((this._user_last_name != value))
				{
					this.Onuser_last_nameChanging(value);
					this.SendPropertyChanging();
					this._user_last_name = value;
					this.SendPropertyChanged("user_last_name");
					this.Onuser_last_nameChanged();
				}
			}
		}
		
		[Column(Storage="_user_mail_address", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string user_mail_address
		{
			get
			{
				return this._user_mail_address;
			}
			set
			{
				if ((this._user_mail_address != value))
				{
					this.Onuser_mail_addressChanging(value);
					this.SendPropertyChanging();
					this._user_mail_address = value;
					this.SendPropertyChanged("user_mail_address");
					this.Onuser_mail_addressChanged();
				}
			}
		}
		
		[Column(Storage="_user_pass_hash", DbType="NVarChar(40) NOT NULL", CanBeNull=false)]
		public string user_pass_hash
		{
			get
			{
				return this._user_pass_hash;
			}
			set
			{
				if ((this._user_pass_hash != value))
				{
					this.Onuser_pass_hashChanging(value);
					this.SendPropertyChanging();
					this._user_pass_hash = value;
					this.SendPropertyChanged("user_pass_hash");
					this.Onuser_pass_hashChanged();
				}
			}
		}
		
		[Column(Storage="_user_pass_salt", DbType="NVarChar(36) NOT NULL", CanBeNull=false)]
		public string user_pass_salt
		{
			get
			{
				return this._user_pass_salt;
			}
			set
			{
				if ((this._user_pass_salt != value))
				{
					this.Onuser_pass_saltChanging(value);
					this.SendPropertyChanging();
					this._user_pass_salt = value;
					this.SendPropertyChanged("user_pass_salt");
					this.Onuser_pass_saltChanged();
				}
			}
		}
		
		[Column(Storage="_user_active", DbType="Bit")]
		public System.Nullable<bool> user_active
		{
			get
			{
				return this._user_active;
			}
			set
			{
				if ((this._user_active != value))
				{
					this.Onuser_activeChanging(value);
					this.SendPropertyChanging();
					this._user_active = value;
					this.SendPropertyChanged("user_active");
					this.Onuser_activeChanged();
				}
			}
		}
		
		[Column(Storage="_user_created_by_id", DbType="Int")]
		public System.Nullable<int> user_created_by_id
		{
			get
			{
				return this._user_created_by_id;
			}
			set
			{
				if ((this._user_created_by_id != value))
				{
					if (this._user1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onuser_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._user_created_by_id = value;
					this.SendPropertyChanged("user_created_by_id");
					this.Onuser_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_user_modified_by_id", DbType="Int")]
		public System.Nullable<int> user_modified_by_id
		{
			get
			{
				return this._user_modified_by_id;
			}
			set
			{
				if ((this._user_modified_by_id != value))
				{
					if (this._user2.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onuser_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._user_modified_by_id = value;
					this.SendPropertyChanged("user_modified_by_id");
					this.Onuser_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_user_permission_access", DbType="Bit")]
		public System.Nullable<bool> user_permission_access
		{
			get
			{
				return this._user_permission_access;
			}
			set
			{
				if ((this._user_permission_access != value))
				{
					this.Onuser_permission_accessChanging(value);
					this.SendPropertyChanging();
					this._user_permission_access = value;
					this.SendPropertyChanged("user_permission_access");
					this.Onuser_permission_accessChanged();
				}
			}
		}
		
		[Association(Name="User_Gallery", Storage="_Galleries", ThisKey="user_id", OtherKey="gallery_created_by_id")]
		public EntitySet<Gallery> Galleries
		{
			get
			{
				return this._Galleries;
			}
			set
			{
				this._Galleries.Assign(value);
			}
		}
		
		[Association(Name="User_Gallery1", Storage="_Galleries1", ThisKey="user_id", OtherKey="gallery_modified_by_id")]
		public EntitySet<Gallery> Galleries1
		{
			get
			{
				return this._Galleries1;
			}
			set
			{
				this._Galleries1.Assign(value);
			}
		}
		
		[Association(Name="User_GalleryImage", Storage="_GalleryImages", ThisKey="user_id", OtherKey="gallery_image_created_by_id")]
		public EntitySet<GalleryImage> GalleryImages
		{
			get
			{
				return this._GalleryImages;
			}
			set
			{
				this._GalleryImages.Assign(value);
			}
		}
		
		[Association(Name="User_GalleryImage1", Storage="_GalleryImages1", ThisKey="user_id", OtherKey="gallery_image_modified_by_id")]
		public EntitySet<GalleryImage> GalleryImages1
		{
			get
			{
				return this._GalleryImages1;
			}
			set
			{
				this._GalleryImages1.Assign(value);
			}
		}
		
		[Association(Name="User_MenuItem", Storage="_MenuItems", ThisKey="user_id", OtherKey="item_created_by_id")]
		public EntitySet<MenuItem> MenuItems
		{
			get
			{
				return this._MenuItems;
			}
			set
			{
				this._MenuItems.Assign(value);
			}
		}
		
		[Association(Name="User_MenuItem1", Storage="_MenuItems1", ThisKey="user_id", OtherKey="item_modified_by_id")]
		public EntitySet<MenuItem> MenuItems1
		{
			get
			{
				return this._MenuItems1;
			}
			set
			{
				this._MenuItems1.Assign(value);
			}
		}
		
		[Association(Name="User_Page", Storage="_Pages", ThisKey="user_id", OtherKey="page_created_by_id")]
		public EntitySet<Page> Pages
		{
			get
			{
				return this._Pages;
			}
			set
			{
				this._Pages.Assign(value);
			}
		}
		
		[Association(Name="User_Page1", Storage="_Pages1", ThisKey="user_id", OtherKey="page_modified_by_id")]
		public EntitySet<Page> Pages1
		{
			get
			{
				return this._Pages1;
			}
			set
			{
				this._Pages1.Assign(value);
			}
		}
		
		[Association(Name="User_VariableValue", Storage="_VariableValues", ThisKey="user_id", OtherKey="variable_value_created_by_id")]
		public EntitySet<VariableValue> VariableValues
		{
			get
			{
				return this._VariableValues;
			}
			set
			{
				this._VariableValues.Assign(value);
			}
		}
		
		[Association(Name="User_VariableValue1", Storage="_VariableValues1", ThisKey="user_id", OtherKey="variable_value_modified_by_id")]
		public EntitySet<VariableValue> VariableValues1
		{
			get
			{
				return this._VariableValues1;
			}
			set
			{
				this._VariableValues1.Assign(value);
			}
		}
		
		[Association(Name="User_Variable", Storage="_Variables", ThisKey="user_id", OtherKey="variable_created_by_id")]
		public EntitySet<Variable> Variables
		{
			get
			{
				return this._Variables;
			}
			set
			{
				this._Variables.Assign(value);
			}
		}
		
		[Association(Name="User_Variable1", Storage="_Variables1", ThisKey="user_id", OtherKey="variable_modified_by_id")]
		public EntitySet<Variable> Variables1
		{
			get
			{
				return this._Variables1;
			}
			set
			{
				this._Variables1.Assign(value);
			}
		}
		
		[Association(Name="User_User", Storage="_users", ThisKey="user_id", OtherKey="user_created_by_id")]
		public EntitySet<User> users
		{
			get
			{
				return this._users;
			}
			set
			{
				this._users.Assign(value);
			}
		}
		
		[Association(Name="User_User1", Storage="_Users1", ThisKey="user_id", OtherKey="user_modified_by_id")]
		public EntitySet<User> Users1
		{
			get
			{
				return this._Users1;
			}
			set
			{
				this._Users1.Assign(value);
			}
		}
		
		[Association(Name="User_UserLanguage", Storage="_UserLanguages", ThisKey="user_id", OtherKey="user_id")]
		public EntitySet<UserLanguage> UserLanguages
		{
			get
			{
				return this._UserLanguages;
			}
			set
			{
				this._UserLanguages.Assign(value);
			}
		}
		
		[Association(Name="User_UserPageType", Storage="_UserPageTypes", ThisKey="user_id", OtherKey="user_id")]
		public EntitySet<UserPageType> UserPageTypes
		{
			get
			{
				return this._UserPageTypes;
			}
			set
			{
				this._UserPageTypes.Assign(value);
			}
		}
		
		[Association(Name="User_Language", Storage="_languages", ThisKey="user_id", OtherKey="language_created_by_id")]
		public EntitySet<Language> languages
		{
			get
			{
				return this._languages;
			}
			set
			{
				this._languages.Assign(value);
			}
		}
		
		[Association(Name="User_Language1", Storage="_Languages1", ThisKey="user_id", OtherKey="language_modified_by_id")]
		public EntitySet<Language> Languages1
		{
			get
			{
				return this._Languages1;
			}
			set
			{
				this._Languages1.Assign(value);
			}
		}
		
		[Association(Name="User_User", Storage="_user1", ThisKey="user_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user1
		{
			get
			{
				return this._user1.Entity;
			}
			set
			{
				User previousValue = this._user1.Entity;
				if (((previousValue != value) 
							|| (this._user1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user1.Entity = null;
						previousValue.users.Remove(this);
					}
					this._user1.Entity = value;
					if ((value != null))
					{
						value.users.Add(this);
						this._user_created_by_id = value.user_id;
					}
					else
					{
						this._user_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user1");
				}
			}
		}
		
		[Association(Name="User_User1", Storage="_user2", ThisKey="user_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User user2
		{
			get
			{
				return this._user2.Entity;
			}
			set
			{
				User previousValue = this._user2.Entity;
				if (((previousValue != value) 
							|| (this._user2.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._user2.Entity = null;
						previousValue.Users1.Remove(this);
					}
					this._user2.Entity = value;
					if ((value != null))
					{
						value.Users1.Add(this);
						this._user_modified_by_id = value.user_id;
					}
					else
					{
						this._user_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("user2");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_Galleries1(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_Galleries1(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_GalleryImages1(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_GalleryImages1(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_MenuItems(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_MenuItems1(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_MenuItems1(MenuItem entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_Pages1(Page entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_Pages1(Page entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_VariableValues(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_VariableValues1(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_VariableValues1(VariableValue entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
		
		private void detach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		
		private void attach_Variables1(Variable entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_Variables1(Variable entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		
		private void attach_users(User entity)
		{
			this.SendPropertyChanging();
			entity.user1 = this;
		}
		
		private void detach_users(User entity)
		{
			this.SendPropertyChanging();
			entity.user1 = null;
		}
		
		private void attach_Users1(User entity)
		{
			this.SendPropertyChanging();
			entity.user2 = this;
		}
		
		private void detach_Users1(User entity)
		{
			this.SendPropertyChanging();
			entity.user2 = null;
		}
		
		private void attach_UserLanguages(UserLanguage entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
		
		private void detach_UserLanguages(UserLanguage entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
		
		private void attach_UserPageTypes(UserPageType entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
		
		private void detach_UserPageTypes(UserPageType entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
		
		private void attach_languages(Language entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
		
		private void detach_languages(Language entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
		
		private void attach_Languages1(Language entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
		
		private void detach_Languages1(Language entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
	}
	
	[Table(Name="dbo.user_languages")]
	public partial class UserLanguage : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _user_language_id;
		
		private System.DateTime _user_language_created;
		
		private System.DateTime _user_language_modified;
		
		private int _user_id;
		
		private int _language_id;
		
		private EntityRef<User> _User;
		
		private EntityRef<Language> _Language;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onuser_language_idChanging(int value);
    partial void Onuser_language_idChanged();
    partial void Onuser_language_createdChanging(System.DateTime value);
    partial void Onuser_language_createdChanged();
    partial void Onuser_language_modifiedChanging(System.DateTime value);
    partial void Onuser_language_modifiedChanged();
    partial void Onuser_idChanging(int value);
    partial void Onuser_idChanged();
    partial void Onlanguage_idChanging(int value);
    partial void Onlanguage_idChanged();
    #endregion
		
		public UserLanguage()
		{
			this._User = default(EntityRef<User>);
			this._Language = default(EntityRef<Language>);
			OnCreated();
		}
		
		[Column(Storage="_user_language_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int user_language_id
		{
			get
			{
				return this._user_language_id;
			}
			set
			{
				if ((this._user_language_id != value))
				{
					this.Onuser_language_idChanging(value);
					this.SendPropertyChanging();
					this._user_language_id = value;
					this.SendPropertyChanged("user_language_id");
					this.Onuser_language_idChanged();
				}
			}
		}
		
		[Column(Storage="_user_language_created", DbType="DateTime NOT NULL")]
		public System.DateTime user_language_created
		{
			get
			{
				return this._user_language_created;
			}
			set
			{
				if ((this._user_language_created != value))
				{
					this.Onuser_language_createdChanging(value);
					this.SendPropertyChanging();
					this._user_language_created = value;
					this.SendPropertyChanged("user_language_created");
					this.Onuser_language_createdChanged();
				}
			}
		}
		
		[Column(Storage="_user_language_modified", DbType="DateTime NOT NULL")]
		public System.DateTime user_language_modified
		{
			get
			{
				return this._user_language_modified;
			}
			set
			{
				if ((this._user_language_modified != value))
				{
					this.Onuser_language_modifiedChanging(value);
					this.SendPropertyChanging();
					this._user_language_modified = value;
					this.SendPropertyChanged("user_language_modified");
					this.Onuser_language_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_user_id", DbType="Int NOT NULL")]
		public int user_id
		{
			get
			{
				return this._user_id;
			}
			set
			{
				if ((this._user_id != value))
				{
					if (this._User.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onuser_idChanging(value);
					this.SendPropertyChanging();
					this._user_id = value;
					this.SendPropertyChanged("user_id");
					this.Onuser_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_id", DbType="Int NOT NULL")]
		public int language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					if (this._Language.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Association(Name="User_UserLanguage", Storage="_User", ThisKey="user_id", OtherKey="user_id", IsForeignKey=true)]
		public User User
		{
			get
			{
				return this._User.Entity;
			}
			set
			{
				User previousValue = this._User.Entity;
				if (((previousValue != value) 
							|| (this._User.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User.Entity = null;
						previousValue.UserLanguages.Remove(this);
					}
					this._User.Entity = value;
					if ((value != null))
					{
						value.UserLanguages.Add(this);
						this._user_id = value.user_id;
					}
					else
					{
						this._user_id = default(int);
					}
					this.SendPropertyChanged("User");
				}
			}
		}
		
		[Association(Name="Language_UserLanguage", Storage="_Language", ThisKey="language_id", OtherKey="language_id", IsForeignKey=true)]
		public Language Language
		{
			get
			{
				return this._Language.Entity;
			}
			set
			{
				Language previousValue = this._Language.Entity;
				if (((previousValue != value) 
							|| (this._Language.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._Language.Entity = null;
						previousValue.UserLanguages.Remove(this);
					}
					this._Language.Entity = value;
					if ((value != null))
					{
						value.UserLanguages.Add(this);
						this._language_id = value.language_id;
					}
					else
					{
						this._language_id = default(int);
					}
					this.SendPropertyChanged("Language");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.user_page_types")]
	public partial class UserPageType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _user_page_type_id;
		
		private System.DateTime _user_page_type_created;
		
		private System.DateTime _user_page_type_modified;
		
		private int _user_id;
		
		private int _page_type_id;
		
		private EntityRef<User> _User;
		
		private EntityRef<PageType> _PageType;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onuser_page_type_idChanging(int value);
    partial void Onuser_page_type_idChanged();
    partial void Onuser_page_type_createdChanging(System.DateTime value);
    partial void Onuser_page_type_createdChanged();
    partial void Onuser_page_type_modifiedChanging(System.DateTime value);
    partial void Onuser_page_type_modifiedChanged();
    partial void Onuser_idChanging(int value);
    partial void Onuser_idChanged();
    partial void Onpage_type_idChanging(int value);
    partial void Onpage_type_idChanged();
    #endregion
		
		public UserPageType()
		{
			this._User = default(EntityRef<User>);
			this._PageType = default(EntityRef<PageType>);
			OnCreated();
		}
		
		[Column(Storage="_user_page_type_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int user_page_type_id
		{
			get
			{
				return this._user_page_type_id;
			}
			set
			{
				if ((this._user_page_type_id != value))
				{
					this.Onuser_page_type_idChanging(value);
					this.SendPropertyChanging();
					this._user_page_type_id = value;
					this.SendPropertyChanged("user_page_type_id");
					this.Onuser_page_type_idChanged();
				}
			}
		}
		
		[Column(Storage="_user_page_type_created", DbType="DateTime NOT NULL")]
		public System.DateTime user_page_type_created
		{
			get
			{
				return this._user_page_type_created;
			}
			set
			{
				if ((this._user_page_type_created != value))
				{
					this.Onuser_page_type_createdChanging(value);
					this.SendPropertyChanging();
					this._user_page_type_created = value;
					this.SendPropertyChanged("user_page_type_created");
					this.Onuser_page_type_createdChanged();
				}
			}
		}
		
		[Column(Storage="_user_page_type_modified", DbType="DateTime NOT NULL")]
		public System.DateTime user_page_type_modified
		{
			get
			{
				return this._user_page_type_modified;
			}
			set
			{
				if ((this._user_page_type_modified != value))
				{
					this.Onuser_page_type_modifiedChanging(value);
					this.SendPropertyChanging();
					this._user_page_type_modified = value;
					this.SendPropertyChanged("user_page_type_modified");
					this.Onuser_page_type_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_user_id", DbType="Int NOT NULL")]
		public int user_id
		{
			get
			{
				return this._user_id;
			}
			set
			{
				if ((this._user_id != value))
				{
					if (this._User.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onuser_idChanging(value);
					this.SendPropertyChanging();
					this._user_id = value;
					this.SendPropertyChanged("user_id");
					this.Onuser_idChanged();
				}
			}
		}
		
		[Column(Storage="_page_type_id", DbType="Int NOT NULL")]
		public int page_type_id
		{
			get
			{
				return this._page_type_id;
			}
			set
			{
				if ((this._page_type_id != value))
				{
					if (this._PageType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onpage_type_idChanging(value);
					this.SendPropertyChanging();
					this._page_type_id = value;
					this.SendPropertyChanged("page_type_id");
					this.Onpage_type_idChanged();
				}
			}
		}
		
		[Association(Name="User_UserPageType", Storage="_User", ThisKey="user_id", OtherKey="user_id", IsForeignKey=true)]
		public User User
		{
			get
			{
				return this._User.Entity;
			}
			set
			{
				User previousValue = this._User.Entity;
				if (((previousValue != value) 
							|| (this._User.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User.Entity = null;
						previousValue.UserPageTypes.Remove(this);
					}
					this._User.Entity = value;
					if ((value != null))
					{
						value.UserPageTypes.Add(this);
						this._user_id = value.user_id;
					}
					else
					{
						this._user_id = default(int);
					}
					this.SendPropertyChanged("User");
				}
			}
		}
		
		[Association(Name="PageType_UserPageType", Storage="_PageType", ThisKey="page_type_id", OtherKey="page_type_id", IsForeignKey=true)]
		public PageType PageType
		{
			get
			{
				return this._PageType.Entity;
			}
			set
			{
				PageType previousValue = this._PageType.Entity;
				if (((previousValue != value) 
							|| (this._PageType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._PageType.Entity = null;
						previousValue.UserPageTypes.Remove(this);
					}
					this._PageType.Entity = value;
					if ((value != null))
					{
						value.UserPageTypes.Add(this);
						this._page_type_id = value.page_type_id;
					}
					else
					{
						this._page_type_id = default(int);
					}
					this.SendPropertyChanged("PageType");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.languages")]
	public partial class Language : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _language_id;
		
		private System.DateTime _language_created;
		
		private System.DateTime _language_modified;
		
		private string _language_abbr;
		
		private string _language_name;
		
		private string _language_img;
		
		private System.Nullable<int> _language_created_by_id;
		
		private System.Nullable<int> _language_modified_by_id;
		
		private bool _language_is_default;
		
		private System.Nullable<bool> _language_active;
		
		private EntitySet<Gallery> _Galleries;
		
		private EntitySet<GalleryImage> _GalleryImages;
		
		private EntitySet<Menu> _Menus;
		
		private EntitySet<Module> _Modules;
		
		private EntitySet<PageType> _PageTypes;
		
		private EntitySet<Page> _Pages;
		
		private EntitySet<Template> _Templates;
		
		private EntitySet<Variable> _Variables;
		
		private EntitySet<UserLanguage> _UserLanguages;
		
		private EntityRef<User> _User;
		
		private EntityRef<User> _User1;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onlanguage_idChanging(int value);
    partial void Onlanguage_idChanged();
    partial void Onlanguage_createdChanging(System.DateTime value);
    partial void Onlanguage_createdChanged();
    partial void Onlanguage_modifiedChanging(System.DateTime value);
    partial void Onlanguage_modifiedChanged();
    partial void Onlanguage_abbrChanging(string value);
    partial void Onlanguage_abbrChanged();
    partial void Onlanguage_nameChanging(string value);
    partial void Onlanguage_nameChanged();
    partial void Onlanguage_imgChanging(string value);
    partial void Onlanguage_imgChanged();
    partial void Onlanguage_created_by_idChanging(System.Nullable<int> value);
    partial void Onlanguage_created_by_idChanged();
    partial void Onlanguage_modified_by_idChanging(System.Nullable<int> value);
    partial void Onlanguage_modified_by_idChanged();
    partial void Onlanguage_is_defaultChanging(bool value);
    partial void Onlanguage_is_defaultChanged();
    partial void Onlanguage_activeChanging(System.Nullable<bool> value);
    partial void Onlanguage_activeChanged();
    #endregion
		
		public Language()
		{
			this._Galleries = new EntitySet<Gallery>(new Action<Gallery>(this.attach_Galleries), new Action<Gallery>(this.detach_Galleries));
			this._GalleryImages = new EntitySet<GalleryImage>(new Action<GalleryImage>(this.attach_GalleryImages), new Action<GalleryImage>(this.detach_GalleryImages));
			this._Menus = new EntitySet<Menu>(new Action<Menu>(this.attach_Menus), new Action<Menu>(this.detach_Menus));
			this._Modules = new EntitySet<Module>(new Action<Module>(this.attach_Modules), new Action<Module>(this.detach_Modules));
			this._PageTypes = new EntitySet<PageType>(new Action<PageType>(this.attach_PageTypes), new Action<PageType>(this.detach_PageTypes));
			this._Pages = new EntitySet<Page>(new Action<Page>(this.attach_Pages), new Action<Page>(this.detach_Pages));
			this._Templates = new EntitySet<Template>(new Action<Template>(this.attach_Templates), new Action<Template>(this.detach_Templates));
			this._Variables = new EntitySet<Variable>(new Action<Variable>(this.attach_Variables), new Action<Variable>(this.detach_Variables));
			this._UserLanguages = new EntitySet<UserLanguage>(new Action<UserLanguage>(this.attach_UserLanguages), new Action<UserLanguage>(this.detach_UserLanguages));
			this._User = default(EntityRef<User>);
			this._User1 = default(EntityRef<User>);
			OnCreated();
		}
		
		[Column(Storage="_language_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int language_id
		{
			get
			{
				return this._language_id;
			}
			set
			{
				if ((this._language_id != value))
				{
					this.Onlanguage_idChanging(value);
					this.SendPropertyChanging();
					this._language_id = value;
					this.SendPropertyChanged("language_id");
					this.Onlanguage_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_created", DbType="DateTime NOT NULL")]
		public System.DateTime language_created
		{
			get
			{
				return this._language_created;
			}
			set
			{
				if ((this._language_created != value))
				{
					this.Onlanguage_createdChanging(value);
					this.SendPropertyChanging();
					this._language_created = value;
					this.SendPropertyChanged("language_created");
					this.Onlanguage_createdChanged();
				}
			}
		}
		
		[Column(Storage="_language_modified", DbType="DateTime NOT NULL")]
		public System.DateTime language_modified
		{
			get
			{
				return this._language_modified;
			}
			set
			{
				if ((this._language_modified != value))
				{
					this.Onlanguage_modifiedChanging(value);
					this.SendPropertyChanging();
					this._language_modified = value;
					this.SendPropertyChanged("language_modified");
					this.Onlanguage_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_language_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string language_abbr
		{
			get
			{
				return this._language_abbr;
			}
			set
			{
				if ((this._language_abbr != value))
				{
					this.Onlanguage_abbrChanging(value);
					this.SendPropertyChanging();
					this._language_abbr = value;
					this.SendPropertyChanged("language_abbr");
					this.Onlanguage_abbrChanged();
				}
			}
		}
		
		[Column(Storage="_language_name", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
		public string language_name
		{
			get
			{
				return this._language_name;
			}
			set
			{
				if ((this._language_name != value))
				{
					this.Onlanguage_nameChanging(value);
					this.SendPropertyChanging();
					this._language_name = value;
					this.SendPropertyChanged("language_name");
					this.Onlanguage_nameChanged();
				}
			}
		}
		
		[Column(Storage="_language_img", DbType="NVarChar(100)")]
		public string language_img
		{
			get
			{
				return this._language_img;
			}
			set
			{
				if ((this._language_img != value))
				{
					this.Onlanguage_imgChanging(value);
					this.SendPropertyChanging();
					this._language_img = value;
					this.SendPropertyChanged("language_img");
					this.Onlanguage_imgChanged();
				}
			}
		}
		
		[Column(Storage="_language_created_by_id", DbType="Int")]
		public System.Nullable<int> language_created_by_id
		{
			get
			{
				return this._language_created_by_id;
			}
			set
			{
				if ((this._language_created_by_id != value))
				{
					if (this._User.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_created_by_idChanging(value);
					this.SendPropertyChanging();
					this._language_created_by_id = value;
					this.SendPropertyChanged("language_created_by_id");
					this.Onlanguage_created_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_modified_by_id", DbType="Int")]
		public System.Nullable<int> language_modified_by_id
		{
			get
			{
				return this._language_modified_by_id;
			}
			set
			{
				if ((this._language_modified_by_id != value))
				{
					if (this._User1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onlanguage_modified_by_idChanging(value);
					this.SendPropertyChanging();
					this._language_modified_by_id = value;
					this.SendPropertyChanged("language_modified_by_id");
					this.Onlanguage_modified_by_idChanged();
				}
			}
		}
		
		[Column(Storage="_language_is_default", DbType="Bit NOT NULL")]
		public bool language_is_default
		{
			get
			{
				return this._language_is_default;
			}
			set
			{
				if ((this._language_is_default != value))
				{
					this.Onlanguage_is_defaultChanging(value);
					this.SendPropertyChanging();
					this._language_is_default = value;
					this.SendPropertyChanged("language_is_default");
					this.Onlanguage_is_defaultChanged();
				}
			}
		}
		
		[Column(Storage="_language_active", DbType="Bit")]
		public System.Nullable<bool> language_active
		{
			get
			{
				return this._language_active;
			}
			set
			{
				if ((this._language_active != value))
				{
					this.Onlanguage_activeChanging(value);
					this.SendPropertyChanging();
					this._language_active = value;
					this.SendPropertyChanged("language_active");
					this.Onlanguage_activeChanged();
				}
			}
		}
		
		[Association(Name="Language_Gallery", Storage="_Galleries", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Gallery> Galleries
		{
			get
			{
				return this._Galleries;
			}
			set
			{
				this._Galleries.Assign(value);
			}
		}
		
		[Association(Name="Language_GalleryImage", Storage="_GalleryImages", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<GalleryImage> GalleryImages
		{
			get
			{
				return this._GalleryImages;
			}
			set
			{
				this._GalleryImages.Assign(value);
			}
		}
		
		[Association(Name="Language_Menu", Storage="_Menus", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Menu> Menus
		{
			get
			{
				return this._Menus;
			}
			set
			{
				this._Menus.Assign(value);
			}
		}
		
		[Association(Name="Language_Module", Storage="_Modules", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Module> Modules
		{
			get
			{
				return this._Modules;
			}
			set
			{
				this._Modules.Assign(value);
			}
		}
		
		[Association(Name="Language_PageType", Storage="_PageTypes", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<PageType> PageTypes
		{
			get
			{
				return this._PageTypes;
			}
			set
			{
				this._PageTypes.Assign(value);
			}
		}
		
		[Association(Name="Language_Page", Storage="_Pages", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Page> Pages
		{
			get
			{
				return this._Pages;
			}
			set
			{
				this._Pages.Assign(value);
			}
		}
		
		[Association(Name="Language_Template", Storage="_Templates", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Template> Templates
		{
			get
			{
				return this._Templates;
			}
			set
			{
				this._Templates.Assign(value);
			}
		}
		
		[Association(Name="Language_Variable", Storage="_Variables", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<Variable> Variables
		{
			get
			{
				return this._Variables;
			}
			set
			{
				this._Variables.Assign(value);
			}
		}
		
		[Association(Name="Language_UserLanguage", Storage="_UserLanguages", ThisKey="language_id", OtherKey="language_id")]
		public EntitySet<UserLanguage> UserLanguages
		{
			get
			{
				return this._UserLanguages;
			}
			set
			{
				this._UserLanguages.Assign(value);
			}
		}
		
		[Association(Name="User_Language", Storage="_User", ThisKey="language_created_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User
		{
			get
			{
				return this._User.Entity;
			}
			set
			{
				User previousValue = this._User.Entity;
				if (((previousValue != value) 
							|| (this._User.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User.Entity = null;
						previousValue.languages.Remove(this);
					}
					this._User.Entity = value;
					if ((value != null))
					{
						value.languages.Add(this);
						this._language_created_by_id = value.user_id;
					}
					else
					{
						this._language_created_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User");
				}
			}
		}
		
		[Association(Name="User_Language1", Storage="_User1", ThisKey="language_modified_by_id", OtherKey="user_id", IsForeignKey=true)]
		public User User1
		{
			get
			{
				return this._User1.Entity;
			}
			set
			{
				User previousValue = this._User1.Entity;
				if (((previousValue != value) 
							|| (this._User1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._User1.Entity = null;
						previousValue.Languages1.Remove(this);
					}
					this._User1.Entity = value;
					if ((value != null))
					{
						value.Languages1.Add(this);
						this._language_modified_by_id = value.user_id;
					}
					else
					{
						this._language_modified_by_id = default(Nullable<int>);
					}
					this.SendPropertyChanged("User1");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Galleries(Gallery entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_GalleryImages(GalleryImage entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_Menus(Menu entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Menus(Menu entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_Modules(Module entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Modules(Module entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_PageTypes(PageType entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_PageTypes(PageType entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Pages(Page entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_Templates(Template entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Templates(Template entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_Variables(Variable entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
		
		private void attach_UserLanguages(UserLanguage entity)
		{
			this.SendPropertyChanging();
			entity.Language = this;
		}
		
		private void detach_UserLanguages(UserLanguage entity)
		{
			this.SendPropertyChanging();
			entity.Language = null;
		}
	}
	
	[Table(Name="dbo.wix_filter_services")]
	public partial class WixFilterService : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _service_id;
		
		private System.DateTime _service_created;
		
		private System.DateTime _service_modified;
		
		private string _service_name;
		
		private string _service_abbr;
		
		private EntitySet<WixFilter> _WixFilters;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onservice_idChanging(int value);
    partial void Onservice_idChanged();
    partial void Onservice_createdChanging(System.DateTime value);
    partial void Onservice_createdChanged();
    partial void Onservice_modifiedChanging(System.DateTime value);
    partial void Onservice_modifiedChanged();
    partial void Onservice_nameChanging(string value);
    partial void Onservice_nameChanged();
    partial void Onservice_abbrChanging(string value);
    partial void Onservice_abbrChanged();
    #endregion
		
		public WixFilterService()
		{
			this._WixFilters = new EntitySet<WixFilter>(new Action<WixFilter>(this.attach_WixFilters), new Action<WixFilter>(this.detach_WixFilters));
			OnCreated();
		}
		
		[Column(Storage="_service_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int service_id
		{
			get
			{
				return this._service_id;
			}
			set
			{
				if ((this._service_id != value))
				{
					this.Onservice_idChanging(value);
					this.SendPropertyChanging();
					this._service_id = value;
					this.SendPropertyChanged("service_id");
					this.Onservice_idChanged();
				}
			}
		}
		
		[Column(Storage="_service_created", DbType="DateTime NOT NULL")]
		public System.DateTime service_created
		{
			get
			{
				return this._service_created;
			}
			set
			{
				if ((this._service_created != value))
				{
					this.Onservice_createdChanging(value);
					this.SendPropertyChanging();
					this._service_created = value;
					this.SendPropertyChanged("service_created");
					this.Onservice_createdChanged();
				}
			}
		}
		
		[Column(Storage="_service_modified", DbType="DateTime NOT NULL")]
		public System.DateTime service_modified
		{
			get
			{
				return this._service_modified;
			}
			set
			{
				if ((this._service_modified != value))
				{
					this.Onservice_modifiedChanging(value);
					this.SendPropertyChanging();
					this._service_modified = value;
					this.SendPropertyChanged("service_modified");
					this.Onservice_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_service_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string service_name
		{
			get
			{
				return this._service_name;
			}
			set
			{
				if ((this._service_name != value))
				{
					this.Onservice_nameChanging(value);
					this.SendPropertyChanging();
					this._service_name = value;
					this.SendPropertyChanged("service_name");
					this.Onservice_nameChanged();
				}
			}
		}
		
		[Column(Storage="_service_abbr", DbType="NVarChar(20) NOT NULL", CanBeNull=false)]
		public string service_abbr
		{
			get
			{
				return this._service_abbr;
			}
			set
			{
				if ((this._service_abbr != value))
				{
					this.Onservice_abbrChanging(value);
					this.SendPropertyChanging();
					this._service_abbr = value;
					this.SendPropertyChanged("service_abbr");
					this.Onservice_abbrChanged();
				}
			}
		}
		
		[Association(Name="WixFilterService_WixFilter", Storage="_WixFilters", ThisKey="service_id", OtherKey="filter_service_id")]
		public EntitySet<WixFilter> WixFilters
		{
			get
			{
				return this._WixFilters;
			}
			set
			{
				this._WixFilters.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterService = this;
		}
		
		private void detach_WixFilters(WixFilter entity)
		{
			this.SendPropertyChanging();
			entity.WixFilterService = null;
		}
	}
	
	[Table(Name="dbo.filtron_interchanges")]
	public partial class FiltronInterchange : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _interchange_id;
		
		private System.DateTime _interchange_created;
		
		private System.DateTime _interchange_modified;
		
		private int _filter_id;
		
		private int _manufacturer_id;
		
		private string _foreign_filter_number;
		
		private string _foreign_filter_trim;
		
		private System.Nullable<bool> _filter_is_oe;
		
		private EntityRef<FiltronFilter> _FiltronFilter;
		
		private EntityRef<FiltronInterchangeManufacturer> _FiltronInterchangeManufacturer;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Oninterchange_idChanging(int value);
    partial void Oninterchange_idChanged();
    partial void Oninterchange_createdChanging(System.DateTime value);
    partial void Oninterchange_createdChanged();
    partial void Oninterchange_modifiedChanging(System.DateTime value);
    partial void Oninterchange_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void Onmanufacturer_idChanging(int value);
    partial void Onmanufacturer_idChanged();
    partial void Onforeign_filter_numberChanging(string value);
    partial void Onforeign_filter_numberChanged();
    partial void Onforeign_filter_trimChanging(string value);
    partial void Onforeign_filter_trimChanged();
    partial void Onfilter_is_oeChanging(System.Nullable<bool> value);
    partial void Onfilter_is_oeChanged();
    #endregion
		
		public FiltronInterchange()
		{
			this._FiltronFilter = default(EntityRef<FiltronFilter>);
			this._FiltronInterchangeManufacturer = default(EntityRef<FiltronInterchangeManufacturer>);
			OnCreated();
		}
		
		[Column(Storage="_interchange_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int interchange_id
		{
			get
			{
				return this._interchange_id;
			}
			set
			{
				if ((this._interchange_id != value))
				{
					this.Oninterchange_idChanging(value);
					this.SendPropertyChanging();
					this._interchange_id = value;
					this.SendPropertyChanged("interchange_id");
					this.Oninterchange_idChanged();
				}
			}
		}
		
		[Column(Storage="_interchange_created", DbType="DateTime NOT NULL")]
		public System.DateTime interchange_created
		{
			get
			{
				return this._interchange_created;
			}
			set
			{
				if ((this._interchange_created != value))
				{
					this.Oninterchange_createdChanging(value);
					this.SendPropertyChanging();
					this._interchange_created = value;
					this.SendPropertyChanged("interchange_created");
					this.Oninterchange_createdChanged();
				}
			}
		}
		
		[Column(Storage="_interchange_modified", DbType="DateTime NOT NULL")]
		public System.DateTime interchange_modified
		{
			get
			{
				return this._interchange_modified;
			}
			set
			{
				if ((this._interchange_modified != value))
				{
					this.Oninterchange_modifiedChanging(value);
					this.SendPropertyChanging();
					this._interchange_modified = value;
					this.SendPropertyChanged("interchange_modified");
					this.Oninterchange_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._FiltronFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_manufacturer_id", DbType="Int NOT NULL")]
		public int manufacturer_id
		{
			get
			{
				return this._manufacturer_id;
			}
			set
			{
				if ((this._manufacturer_id != value))
				{
					if (this._FiltronInterchangeManufacturer.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onmanufacturer_idChanging(value);
					this.SendPropertyChanging();
					this._manufacturer_id = value;
					this.SendPropertyChanged("manufacturer_id");
					this.Onmanufacturer_idChanged();
				}
			}
		}
		
		[Column(Storage="_foreign_filter_number", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string foreign_filter_number
		{
			get
			{
				return this._foreign_filter_number;
			}
			set
			{
				if ((this._foreign_filter_number != value))
				{
					this.Onforeign_filter_numberChanging(value);
					this.SendPropertyChanging();
					this._foreign_filter_number = value;
					this.SendPropertyChanged("foreign_filter_number");
					this.Onforeign_filter_numberChanged();
				}
			}
		}
		
		[Column(Storage="_foreign_filter_trim", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
		public string foreign_filter_trim
		{
			get
			{
				return this._foreign_filter_trim;
			}
			set
			{
				if ((this._foreign_filter_trim != value))
				{
					this.Onforeign_filter_trimChanging(value);
					this.SendPropertyChanging();
					this._foreign_filter_trim = value;
					this.SendPropertyChanged("foreign_filter_trim");
					this.Onforeign_filter_trimChanged();
				}
			}
		}
		
		[Column(Storage="_filter_is_oe", DbType="Bit")]
		public System.Nullable<bool> filter_is_oe
		{
			get
			{
				return this._filter_is_oe;
			}
			set
			{
				if ((this._filter_is_oe != value))
				{
					this.Onfilter_is_oeChanging(value);
					this.SendPropertyChanging();
					this._filter_is_oe = value;
					this.SendPropertyChanged("filter_is_oe");
					this.Onfilter_is_oeChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilter_filtron_interchange", Storage="_FiltronFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public FiltronFilter FiltronFilter
		{
			get
			{
				return this._FiltronFilter.Entity;
			}
			set
			{
				FiltronFilter previousValue = this._FiltronFilter.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilter.Entity = null;
						previousValue.FiltronInterchanges.Remove(this);
					}
					this._FiltronFilter.Entity = value;
					if ((value != null))
					{
						value.FiltronInterchanges.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilter");
				}
			}
		}
		
		[Association(Name="FiltronInterchangeManufacturer_filtron_interchange", Storage="_FiltronInterchangeManufacturer", ThisKey="manufacturer_id", OtherKey="manufacturer_id", IsForeignKey=true)]
		public FiltronInterchangeManufacturer FiltronInterchangeManufacturer
		{
			get
			{
				return this._FiltronInterchangeManufacturer.Entity;
			}
			set
			{
				FiltronInterchangeManufacturer previousValue = this._FiltronInterchangeManufacturer.Entity;
				if (((previousValue != value) 
							|| (this._FiltronInterchangeManufacturer.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronInterchangeManufacturer.Entity = null;
						previousValue.FiltronInterchanges.Remove(this);
					}
					this._FiltronInterchangeManufacturer.Entity = value;
					if ((value != null))
					{
						value.FiltronInterchanges.Add(this);
						this._manufacturer_id = value.manufacturer_id;
					}
					else
					{
						this._manufacturer_id = default(int);
					}
					this.SendPropertyChanged("FiltronInterchangeManufacturer");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.filtron_logistics_info")]
	public partial class FiltronLogisticsInfo : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _logistics_info_id;
		
		private System.DateTime _logistics_info_created;
		
		private System.DateTime _logistics_info_modified;
		
		private int _filter_id;
		
		private string _hd;
		
		private System.Nullable<int> _min_ilosc_zam;
		
		private System.Nullable<int> _ilosc_zg;
		
		private System.Nullable<int> _ilosc_pal;
		
		private System.Nullable<int> _kart_w;
		
		private System.Nullable<int> _kart_h;
		
		private System.Nullable<int> _kart_l;
		
		private string _waga;
		
		private string _kod_ean;
		
		private EntityRef<FiltronFilter> _FiltronFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onlogistics_info_idChanging(int value);
    partial void Onlogistics_info_idChanged();
    partial void Onlogistics_info_createdChanging(System.DateTime value);
    partial void Onlogistics_info_createdChanged();
    partial void Onlogistics_info_modifiedChanging(System.DateTime value);
    partial void Onlogistics_info_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void OnhdChanging(string value);
    partial void OnhdChanged();
    partial void Onmin_ilosc_zamChanging(System.Nullable<int> value);
    partial void Onmin_ilosc_zamChanged();
    partial void Onilosc_zgChanging(System.Nullable<int> value);
    partial void Onilosc_zgChanged();
    partial void Onilosc_palChanging(System.Nullable<int> value);
    partial void Onilosc_palChanged();
    partial void Onkart_wChanging(System.Nullable<int> value);
    partial void Onkart_wChanged();
    partial void Onkart_hChanging(System.Nullable<int> value);
    partial void Onkart_hChanged();
    partial void Onkart_lChanging(System.Nullable<int> value);
    partial void Onkart_lChanged();
    partial void OnwagaChanging(string value);
    partial void OnwagaChanged();
    partial void Onkod_eanChanging(string value);
    partial void Onkod_eanChanged();
    #endregion
		
		public FiltronLogisticsInfo()
		{
			this._FiltronFilter = default(EntityRef<FiltronFilter>);
			OnCreated();
		}
		
		[Column(Storage="_logistics_info_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int logistics_info_id
		{
			get
			{
				return this._logistics_info_id;
			}
			set
			{
				if ((this._logistics_info_id != value))
				{
					this.Onlogistics_info_idChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_id = value;
					this.SendPropertyChanged("logistics_info_id");
					this.Onlogistics_info_idChanged();
				}
			}
		}
		
		[Column(Storage="_logistics_info_created", DbType="DateTime NOT NULL")]
		public System.DateTime logistics_info_created
		{
			get
			{
				return this._logistics_info_created;
			}
			set
			{
				if ((this._logistics_info_created != value))
				{
					this.Onlogistics_info_createdChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_created = value;
					this.SendPropertyChanged("logistics_info_created");
					this.Onlogistics_info_createdChanged();
				}
			}
		}
		
		[Column(Storage="_logistics_info_modified", DbType="DateTime NOT NULL")]
		public System.DateTime logistics_info_modified
		{
			get
			{
				return this._logistics_info_modified;
			}
			set
			{
				if ((this._logistics_info_modified != value))
				{
					this.Onlogistics_info_modifiedChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_modified = value;
					this.SendPropertyChanged("logistics_info_modified");
					this.Onlogistics_info_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._FiltronFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_hd", DbType="NVarChar(80)")]
		public string hd
		{
			get
			{
				return this._hd;
			}
			set
			{
				if ((this._hd != value))
				{
					this.OnhdChanging(value);
					this.SendPropertyChanging();
					this._hd = value;
					this.SendPropertyChanged("hd");
					this.OnhdChanged();
				}
			}
		}
		
		[Column(Storage="_min_ilosc_zam", DbType="Int")]
		public System.Nullable<int> min_ilosc_zam
		{
			get
			{
				return this._min_ilosc_zam;
			}
			set
			{
				if ((this._min_ilosc_zam != value))
				{
					this.Onmin_ilosc_zamChanging(value);
					this.SendPropertyChanging();
					this._min_ilosc_zam = value;
					this.SendPropertyChanged("min_ilosc_zam");
					this.Onmin_ilosc_zamChanged();
				}
			}
		}
		
		[Column(Storage="_ilosc_zg", DbType="Int")]
		public System.Nullable<int> ilosc_zg
		{
			get
			{
				return this._ilosc_zg;
			}
			set
			{
				if ((this._ilosc_zg != value))
				{
					this.Onilosc_zgChanging(value);
					this.SendPropertyChanging();
					this._ilosc_zg = value;
					this.SendPropertyChanged("ilosc_zg");
					this.Onilosc_zgChanged();
				}
			}
		}
		
		[Column(Storage="_ilosc_pal", DbType="Int")]
		public System.Nullable<int> ilosc_pal
		{
			get
			{
				return this._ilosc_pal;
			}
			set
			{
				if ((this._ilosc_pal != value))
				{
					this.Onilosc_palChanging(value);
					this.SendPropertyChanging();
					this._ilosc_pal = value;
					this.SendPropertyChanged("ilosc_pal");
					this.Onilosc_palChanged();
				}
			}
		}
		
		[Column(Storage="_kart_w", DbType="Int")]
		public System.Nullable<int> kart_w
		{
			get
			{
				return this._kart_w;
			}
			set
			{
				if ((this._kart_w != value))
				{
					this.Onkart_wChanging(value);
					this.SendPropertyChanging();
					this._kart_w = value;
					this.SendPropertyChanged("kart_w");
					this.Onkart_wChanged();
				}
			}
		}
		
		[Column(Storage="_kart_h", DbType="Int")]
		public System.Nullable<int> kart_h
		{
			get
			{
				return this._kart_h;
			}
			set
			{
				if ((this._kart_h != value))
				{
					this.Onkart_hChanging(value);
					this.SendPropertyChanging();
					this._kart_h = value;
					this.SendPropertyChanged("kart_h");
					this.Onkart_hChanged();
				}
			}
		}
		
		[Column(Storage="_kart_l", DbType="Int")]
		public System.Nullable<int> kart_l
		{
			get
			{
				return this._kart_l;
			}
			set
			{
				if ((this._kart_l != value))
				{
					this.Onkart_lChanging(value);
					this.SendPropertyChanging();
					this._kart_l = value;
					this.SendPropertyChanged("kart_l");
					this.Onkart_lChanged();
				}
			}
		}
		
		[Column(Storage="_waga", DbType="NVarChar(80)")]
		public string waga
		{
			get
			{
				return this._waga;
			}
			set
			{
				if ((this._waga != value))
				{
					this.OnwagaChanging(value);
					this.SendPropertyChanging();
					this._waga = value;
					this.SendPropertyChanged("waga");
					this.OnwagaChanged();
				}
			}
		}
		
		[Column(Storage="_kod_ean", DbType="NVarChar(80)")]
		public string kod_ean
		{
			get
			{
				return this._kod_ean;
			}
			set
			{
				if ((this._kod_ean != value))
				{
					this.Onkod_eanChanging(value);
					this.SendPropertyChanging();
					this._kod_ean = value;
					this.SendPropertyChanged("kod_ean");
					this.Onkod_eanChanged();
				}
			}
		}
		
		[Association(Name="FiltronFilter_filtron_logistics_info", Storage="_FiltronFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public FiltronFilter FiltronFilter
		{
			get
			{
				return this._FiltronFilter.Entity;
			}
			set
			{
				FiltronFilter previousValue = this._FiltronFilter.Entity;
				if (((previousValue != value) 
							|| (this._FiltronFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._FiltronFilter.Entity = null;
						previousValue.FiltronLogisticsInfos.Remove(this);
					}
					this._FiltronFilter.Entity = value;
					if ((value != null))
					{
						value.FiltronLogisticsInfos.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("FiltronFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[Table(Name="dbo.wix_logistics_info")]
	public partial class WixLogisticsInfo : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _logistics_info_id;
		
		private System.DateTime _logistics_info_created;
		
		private System.DateTime _logistics_info_modified;
		
		private int _filter_id;
		
		private string _hd;
		
		private System.Nullable<int> _min_ilosc_zam;
		
		private System.Nullable<int> _ilosc_zg;
		
		private System.Nullable<int> _ilosc_pal;
		
		private System.Nullable<int> _kart_w;
		
		private System.Nullable<int> _kart_h;
		
		private System.Nullable<int> _kart_l;
		
		private string _waga;
		
		private string _kod_ean;
		
		private EntityRef<WixFilter> _WixFilter;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void Onlogistics_info_idChanging(int value);
    partial void Onlogistics_info_idChanged();
    partial void Onlogistics_info_createdChanging(System.DateTime value);
    partial void Onlogistics_info_createdChanged();
    partial void Onlogistics_info_modifiedChanging(System.DateTime value);
    partial void Onlogistics_info_modifiedChanged();
    partial void Onfilter_idChanging(int value);
    partial void Onfilter_idChanged();
    partial void OnhdChanging(string value);
    partial void OnhdChanged();
    partial void Onmin_ilosc_zamChanging(System.Nullable<int> value);
    partial void Onmin_ilosc_zamChanged();
    partial void Onilosc_zgChanging(System.Nullable<int> value);
    partial void Onilosc_zgChanged();
    partial void Onilosc_palChanging(System.Nullable<int> value);
    partial void Onilosc_palChanged();
    partial void Onkart_wChanging(System.Nullable<int> value);
    partial void Onkart_wChanged();
    partial void Onkart_hChanging(System.Nullable<int> value);
    partial void Onkart_hChanged();
    partial void Onkart_lChanging(System.Nullable<int> value);
    partial void Onkart_lChanged();
    partial void OnwagaChanging(string value);
    partial void OnwagaChanged();
    partial void Onkod_eanChanging(string value);
    partial void Onkod_eanChanged();
    #endregion
		
		public WixLogisticsInfo()
		{
			this._WixFilter = default(EntityRef<WixFilter>);
			OnCreated();
		}
		
		[Column(Storage="_logistics_info_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int logistics_info_id
		{
			get
			{
				return this._logistics_info_id;
			}
			set
			{
				if ((this._logistics_info_id != value))
				{
					this.Onlogistics_info_idChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_id = value;
					this.SendPropertyChanged("logistics_info_id");
					this.Onlogistics_info_idChanged();
				}
			}
		}
		
		[Column(Storage="_logistics_info_created", DbType="DateTime NOT NULL")]
		public System.DateTime logistics_info_created
		{
			get
			{
				return this._logistics_info_created;
			}
			set
			{
				if ((this._logistics_info_created != value))
				{
					this.Onlogistics_info_createdChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_created = value;
					this.SendPropertyChanged("logistics_info_created");
					this.Onlogistics_info_createdChanged();
				}
			}
		}
		
		[Column(Storage="_logistics_info_modified", DbType="DateTime NOT NULL")]
		public System.DateTime logistics_info_modified
		{
			get
			{
				return this._logistics_info_modified;
			}
			set
			{
				if ((this._logistics_info_modified != value))
				{
					this.Onlogistics_info_modifiedChanging(value);
					this.SendPropertyChanging();
					this._logistics_info_modified = value;
					this.SendPropertyChanged("logistics_info_modified");
					this.Onlogistics_info_modifiedChanged();
				}
			}
		}
		
		[Column(Storage="_filter_id", DbType="Int NOT NULL")]
		public int filter_id
		{
			get
			{
				return this._filter_id;
			}
			set
			{
				if ((this._filter_id != value))
				{
					if (this._WixFilter.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.Onfilter_idChanging(value);
					this.SendPropertyChanging();
					this._filter_id = value;
					this.SendPropertyChanged("filter_id");
					this.Onfilter_idChanged();
				}
			}
		}
		
		[Column(Storage="_hd", DbType="NVarChar(80)")]
		public string hd
		{
			get
			{
				return this._hd;
			}
			set
			{
				if ((this._hd != value))
				{
					this.OnhdChanging(value);
					this.SendPropertyChanging();
					this._hd = value;
					this.SendPropertyChanged("hd");
					this.OnhdChanged();
				}
			}
		}
		
		[Column(Storage="_min_ilosc_zam", DbType="Int")]
		public System.Nullable<int> min_ilosc_zam
		{
			get
			{
				return this._min_ilosc_zam;
			}
			set
			{
				if ((this._min_ilosc_zam != value))
				{
					this.Onmin_ilosc_zamChanging(value);
					this.SendPropertyChanging();
					this._min_ilosc_zam = value;
					this.SendPropertyChanged("min_ilosc_zam");
					this.Onmin_ilosc_zamChanged();
				}
			}
		}
		
		[Column(Storage="_ilosc_zg", DbType="Int")]
		public System.Nullable<int> ilosc_zg
		{
			get
			{
				return this._ilosc_zg;
			}
			set
			{
				if ((this._ilosc_zg != value))
				{
					this.Onilosc_zgChanging(value);
					this.SendPropertyChanging();
					this._ilosc_zg = value;
					this.SendPropertyChanged("ilosc_zg");
					this.Onilosc_zgChanged();
				}
			}
		}
		
		[Column(Storage="_ilosc_pal", DbType="Int")]
		public System.Nullable<int> ilosc_pal
		{
			get
			{
				return this._ilosc_pal;
			}
			set
			{
				if ((this._ilosc_pal != value))
				{
					this.Onilosc_palChanging(value);
					this.SendPropertyChanging();
					this._ilosc_pal = value;
					this.SendPropertyChanged("ilosc_pal");
					this.Onilosc_palChanged();
				}
			}
		}
		
		[Column(Storage="_kart_w", DbType="Int")]
		public System.Nullable<int> kart_w
		{
			get
			{
				return this._kart_w;
			}
			set
			{
				if ((this._kart_w != value))
				{
					this.Onkart_wChanging(value);
					this.SendPropertyChanging();
					this._kart_w = value;
					this.SendPropertyChanged("kart_w");
					this.Onkart_wChanged();
				}
			}
		}
		
		[Column(Storage="_kart_h", DbType="Int")]
		public System.Nullable<int> kart_h
		{
			get
			{
				return this._kart_h;
			}
			set
			{
				if ((this._kart_h != value))
				{
					this.Onkart_hChanging(value);
					this.SendPropertyChanging();
					this._kart_h = value;
					this.SendPropertyChanged("kart_h");
					this.Onkart_hChanged();
				}
			}
		}
		
		[Column(Storage="_kart_l", DbType="Int")]
		public System.Nullable<int> kart_l
		{
			get
			{
				return this._kart_l;
			}
			set
			{
				if ((this._kart_l != value))
				{
					this.Onkart_lChanging(value);
					this.SendPropertyChanging();
					this._kart_l = value;
					this.SendPropertyChanged("kart_l");
					this.Onkart_lChanged();
				}
			}
		}
		
		[Column(Storage="_waga", DbType="NVarChar(80)")]
		public string waga
		{
			get
			{
				return this._waga;
			}
			set
			{
				if ((this._waga != value))
				{
					this.OnwagaChanging(value);
					this.SendPropertyChanging();
					this._waga = value;
					this.SendPropertyChanged("waga");
					this.OnwagaChanged();
				}
			}
		}
		
		[Column(Storage="_kod_ean", DbType="NVarChar(80)")]
		public string kod_ean
		{
			get
			{
				return this._kod_ean;
			}
			set
			{
				if ((this._kod_ean != value))
				{
					this.Onkod_eanChanging(value);
					this.SendPropertyChanging();
					this._kod_ean = value;
					this.SendPropertyChanged("kod_ean");
					this.Onkod_eanChanged();
				}
			}
		}
		
		[Association(Name="WixFilter_wix_logistics_info", Storage="_WixFilter", ThisKey="filter_id", OtherKey="filter_id", IsForeignKey=true)]
		public WixFilter WixFilter
		{
			get
			{
				return this._WixFilter.Entity;
			}
			set
			{
				WixFilter previousValue = this._WixFilter.Entity;
				if (((previousValue != value) 
							|| (this._WixFilter.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._WixFilter.Entity = null;
						previousValue.WixLogisticsInfos.Remove(this);
					}
					this._WixFilter.Entity = value;
					if ((value != null))
					{
						value.WixLogisticsInfos.Add(this);
						this._filter_id = value.filter_id;
					}
					else
					{
						this._filter_id = default(int);
					}
					this.SendPropertyChanged("WixFilter");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
#pragma warning restore 1591
